26 lines
733 B
Twig
26 lines
733 B
Twig
{%- set request = grav.request -%}
|
|
{%- set object_context = object ?? {} -%}
|
|
{%- set object_layout = object_context.layout ?? ('list-' ~ layout) -%}
|
|
{% if blacklist %}
|
|
{% set collection = collection.unselect(blacklist) %}
|
|
{% endif %}
|
|
|
|
<div id="flex-objects">
|
|
{% if title %}
|
|
<h2>{{ title|e }}</h2>
|
|
{% endif %}
|
|
|
|
{% if content %}
|
|
<div>{{ content|markdown }}</div>
|
|
{% endif %}
|
|
|
|
<ul class="list">
|
|
{% for object in collection.filterBy({ enabled: true }) %}
|
|
{% set link = request.uri ~ '/id:' ~ object.key %}
|
|
<li>
|
|
{% render object layout: object_layout with object_context|merge({link: link}) %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|