Search code examples
twigsulu

Sulu CMF - Sort order in flat navigation


Beside the main navigation, I want to use a second navigation context to display links in the footer of the homepage.

{% for item in sulu_navigation_root_flat('footer_support', 4) %}
    <li><a href="{{ sulu_content_path(item.url) }}" title="{{ item.title }}">{{ item.title }}</a></li>
{% endfor %}

This is working so far. The problem is that the sort order of the footer links. The order neither matches the order of the items in the backend, nor can I find a way to change that order. Can someone give me a hint please?


Solution

  • The ordering is matching the ordering in the Admin.

    If you want to have different ordering of a Item in the Footer then in the Main Navigation you create a new Node/Page using the "Internal Link" feature of Sulu.

    • Create a new page
    • Save that one put it in the position where you require it for the footer navigation
    • Go to the Pages "Settings" Tab of that Page/Node and Add it to the "Footer Navigation"
    • Change the "Type" to "Internal Link".

    This way you can add a Link at any position of your Footer or other Navigations.