mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 19:17:07 +02:00
Change count filter to length (#1391)
This fixes a bug: there's not twig filter named count, just one that's called length.
This commit is contained in:
committed by
Andy Miller
parent
f5408e0b84
commit
fa56b51c29
@@ -63,7 +63,7 @@
|
||||
data-collection-nosort
|
||||
{% endif %}>
|
||||
{% if field.fields %}
|
||||
{% set collapsible = field.fields|count > 1 and (field.collapsible is not defined or field.collapsible) %}
|
||||
{% set collapsible = field.fields|length > 1 and (field.collapsible is not defined or field.collapsible) %}
|
||||
{% for key, val in value %}
|
||||
{% set itemName = name ? name ~ '.' ~ key : key %}
|
||||
<li data-collection-item="{{ itemName }}" data-collection-key="{{ key }}" class="{{ not collapsible or field.collapsed ? 'collection-collapsed' : '' }}">
|
||||
|
||||
Reference in New Issue
Block a user