diff --git a/modules/blox-tailwind/layouts/partials/blox/collection.html b/modules/blox-tailwind/layouts/partials/blox/collection.html index b977db74..910848f6 100644 --- a/modules/blox-tailwind/layouts/partials/blox/collection.html +++ b/modules/blox-tailwind/layouts/partials/blox/collection.html @@ -94,7 +94,8 @@
- {{ partial "functions/render_view" (dict "fragment" "start" "page" $block "item" . "view" $view) }} + {{ $config := dict "columns" ($block.design.columns | default 2) "len" (len $query) }} + {{ partial "functions/render_view" (dict "fragment" "start" "page" $block "item" . "view" $view "config" $config) }} {{ range $index, $item := $query }} {{ partial "functions/render_view" (dict "page" $block "item" . "view" $view "index" $index) }} diff --git a/modules/blox-tailwind/layouts/partials/functions/render_view.html b/modules/blox-tailwind/layouts/partials/functions/render_view.html index 731a7e2c..14785e51 100644 --- a/modules/blox-tailwind/layouts/partials/functions/render_view.html +++ b/modules/blox-tailwind/layouts/partials/functions/render_view.html @@ -17,7 +17,7 @@ {{ if eq $fragment "body" }} {{ $html = (partial (printf "views/%s" $view) (dict "page" $page "item" $item "index" $index)) }} {{ else }} - {{ $html = (partial (printf "views/%s.%s" $view $fragment) (dict "page" $page "item" $item "index" $index)) }} + {{ $html = (partial (printf "views/%s.%s" $view $fragment) (dict "page" $page "item" $item "index" $index "config" (.config | default dict))) }} {{ end }} {{ return $html }} diff --git a/modules/blox-tailwind/layouts/partials/views/article-grid.start.html b/modules/blox-tailwind/layouts/partials/views/article-grid.start.html index 4ed45c50..01bdee18 100644 --- a/modules/blox-tailwind/layouts/partials/views/article-grid.start.html +++ b/modules/blox-tailwind/layouts/partials/views/article-grid.start.html @@ -1,2 +1,4 @@ -
-
+{{ $columns := .config.columns | default 2 }} +{{ $len := .config.len | default 2 }} +
+