Skip to content

Commit

Permalink
cat_banners
Browse files Browse the repository at this point in the history
  • Loading branch information
dijkr committed Jan 11, 2024
1 parent ad077ae commit b17d1be
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 5 deletions.
2 changes: 1 addition & 1 deletion content/collections/categorieen/frisdrank.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ blueprint: categorieen
title: Frisdrank
banner: categorie_banners/freshdrinks.jpg
updated_by: 53b255e4-e4a1-4f23-b54c-d83887f604f5
updated_at: 1704754126
updated_at: 1705005861
---
47 changes: 47 additions & 0 deletions resources/blueprints/collections/categorieen/categorieen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
tabs:
main:
display: Main
sections:
-
fields:
-
handle: title
field:
type: text
required: true
validate:
- required
-
handle: content
field:
type: markdown
localizable: true
-
handle: banner
field:
max_files: 1
min_files: 1
mode: list
container: banners
restrict: false
allow_uploads: true
show_filename: true
show_set_alt: true
type: assets
display: 'Assets Field'
icon: assets
listable: hidden
instructions_position: above
visibility: visible
hide_display: false
sidebar:
display: Sidebar
sections:
-
fields:
-
handle: slug
field:
type: slug
localizable: true
title: Categorieën
2 changes: 1 addition & 1 deletion resources/views/producten.antlers.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h4> {{ key }} </h4>

{{# SHOW THE SUBCATEGORY ITS PRODUCTS #}}
{{ value }}
<a href="/{{ categorySlug }}/{{ slug }}">
<a href="/{{ category.slug }}/{{ slug }}">
<div class="grid-item-products-1">
<div class="top">
<img src="/images/{{ Image }}">
Expand Down
6 changes: 3 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
Route::get('/categorie/{category:slug}', [ProductController::class, 'showGroupedProducts']);

/* PRODUCT - ONE PRODUCT */
Route::get('/product/{product:slug}', [ProductController::class, 'showProduct']);
// ->where('category', '(?!cms).*');
/* This route somehow handles /cms/collections */
Route::get('/{category.slug}/{product:slug}', [ProductController::class, 'showProduct'])
->where('category', '(?!cms).*');
/* This route somehow handles /cms/* and therefor explicit excluded */

/* SEARCH PRODUCTS */
Route::post('zoekresultaten', [ProductController::class, 'searchProduct']);
Expand Down

0 comments on commit b17d1be

Please sign in to comment.