Show first level's items based on amount

Currently set to show when list has 20 items or less
This commit is contained in:
Kfir Hadas
2017-05-25 15:16:29 +03:00
parent e0ffadb08c
commit ae4d75ecde
2 changed files with 8 additions and 1 deletions

View File

@@ -98,7 +98,7 @@
{% if value is iterable %}
<li>
<a href="" class="folder"><i class="fa fa-folder-open"></i>{{ key }}</a>
<ul>{{ '\n' + loop(value.items()) }}
<ul{% if not loop.depth0 and value.items()|length <= 20 %} data-show="yes"{% endif %}>{{ '\n' + loop(value.items()) }}
</ul>
</li>
{% else %}