{# Load Content From Grav #} {% set attr_extra = particle.extra|attribute_array %} {% set article_settings = particle.article %} {% set filter = article_settings.filter %} {% set sort = article_settings.sort %} {% set limit = article_settings.limit %} {% set start = limit.start %} {% set display = article_settings.display %} {% set categories = filter.categories|split(' ') %} {% set collection = grav.page.collection( { items: {'@taxonomy.category': categories}, order: {by: sort.orderby, dir: sort.ordering}, url_taxonomy_filters: false }, false) %} {% set total = collection.count() %} {% set pages = collection.slice(start, limit.total) %}
{% for page in pages %} {% if display.image.enabled %} {% if display.image.enabled == 'intro' %} {% set file = page.header.image.summary.enabled|defined(false) ? (page.header.image.summary.file ?: true) %} {% elseif display.image.enabled == 'full' %} {% set file = page.header.image.text.enabled|defined(false) ? (page.header.image.text.file ?: true) %} {% endif %} {% set image = file is same as(true) ? page.media.images|first : (file ? page.media.images[file]) %} {% endif %}
{% if particle.slides_linkable == "enabled" %} {% endif %} {% if display.image.enabled and image %} {% if particle.image == "img" %} {% else %}
{% endif %} {% endif %}
{% if display.title.enabled and page.title %}
{{ (display.title.limit ? page.title|e|truncate_text(display.title.limit) : page.title|e)|raw }}
{% endif %} {% if display.text.type != '' %}
{% set page_text = display.text.type == 'intro' ? page.summary : page.content %} {{ page_text|truncate_text(display.text.limit)|raw }}
{% endif %} {% if display.link.enabled %} {{ display.link.label|default('Read More') }} {% endif %}
{% endfor %}
{% if particle.nav == 'enabled' %} {% if gantry.page.direction == 'rtl' %}
{% else %}
{% endif %} {% endif %} {% if particle.pagination %}
{% endif %}
{% if particle.thumbs == 'enabled' %} {% endif %}