sulu-workshop icon indicating copy to clipboard operation
sulu-workshop copied to clipboard

03 - Add a footer navigation to the website

Open luca-rath opened this issue 4 years ago • 0 comments

Add a footer navigation to the website

Goal

Right now, our website displays a static footer section on every page. We want to provide a way to manually manage the links displayed in our footer section to our content manager.

Steps

  • Add a new navigation-context footer to the config/webspaces/example.xml file
  • Log into the admin UI with user "admin" and password "admin"
  • Create a new page and add the page to the footer navigation via the settings tab
  • Output the new footer navigation in your templates/base.html.twig

Hints

  • Have a look at the existing main navigation-context

More Information

Sulu allows to define multiple so called navigation contexts to which the content manager can add an arbitrary number of pages. Navigation contexts are defined in the navigation-section of the webspace configuration and can be assigned to a page via the settings tab in the administration interface.

After defining a navigation context, a developer can retrieve the navigation for a given context by using Twig extensions delivered with Sulu. The provided Twig extensions allow to retrieve a flat list of pages or a complete nested navigation tree.

Links

luca-rath avatar Jul 07 '20 10:07 luca-rath