PHP Classes
elePHPant
Icontem

File: src/Cabin/Hull/View/macros/blog_categories.twig

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  CMS Airship  >  src/Cabin/Hull/View/macros/blog_categories.twig  >  Download  
File: src/Cabin/Hull/View/macros/blog_categories.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CMS Airship
Content management system with security features
Author: By
Last change:
Date: 1 year ago
Size: 516 bytes
 

Contents

Class file image Download
{% macro blogCategories(data, depth) %}
    <li>
        <a href="/blog/category/{{ data.slug|e('url') }}">
            <i class="fa fa-folder{% if data.children %}-open{% endif %}"></i>
            {{ data.name }}
        </a>
        {% if data.children %}
            <ol class="blog_categories">
                {% for child in data.children %}
                    {{ _self.blogCategories(child, depth|default(0) + 1) }}
                {% endfor %}
            </ol>
        {% endif %}
    </li>
{% endmacro %}