Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Split Footer Links Into Columns

Started by Muut Archive 9 years ago · 0 replies · 365 views
9 years ago

Hi,

I want to split my footer links ( generated from pages ) into multiple columns. I have looked through grav and twig docs and just cant seem to get it to work. Here is my codes:

TWIG

    <ul>
         {% macro loop(page) %}
             {% for p in page.children.visible %}
                 {% if p.children.visible.count > 0 %}
                     <li>
                         <a href="{{ p.url }}">
                             {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
                             {{ p.menu }}
                         </a>
                        {{ _self.loop(p) }}
                     </li>
                 {% else %}
                     <li class="{{ current_page }}">
                         <a href="{{ p.url }}">
                             {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
                             {{ p.menu }} 
                         </a>
                     </li>
                 {% endif %}
             {% endfor %}
         {% endmacro %}

        {{ _self.loop(pages) }}
    </ul>
---

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1321 9 years ago
Archive · by Muut Archive, 9 years ago
2 916 9 years ago
Archive · by Muut Archive, 9 years ago
2 4047 9 years ago
Archive · by Muut Archive, 9 years ago
1 2921 9 years ago
Archive · by Muut Archive, 9 years ago
3 1105 9 years ago