{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends 'SonataAdminBundle:CRUD:base_list.html.twig' %} {% import _self as tree %} {% macro pages(pages, admin, rootPages) %} {% for page in pages if not page.internal and (not page.parent or not rootPages)%}
  • {% if page.parent %}{% endif %} {{ page.name }} {{ page.url }} {{ 'pages.compose_label'|trans({}, 'SonataPageBundle') }} {% if page.edited %}{{ 'pages.edited_label'|trans({}, 'SonataPageBundle') }}{% endif %}
    {% if page.children|length %} {{ _self.pages(page.children, admin, false) }} {% endif %}
  • {% endfor %} {% endmacro %} {% block tab_menu %} {% include 'SonataPageBundle:PageAdmin:list_tab_menu.html.twig' with { 'mode': 'tree', 'action': action, 'admin': admin, 'currentSite': currentSite, } only %} {% endblock %} {% block list_table %}

    {{ 'pages.tree_site_label'|trans({}, 'SonataPageBundle') }}

    {{ tree.pages(pages, admin, true) }}
    {% endblock %}