1

I have a Symfony/Sulu site set up, and I understand that I need to add a page to a navigation context in order for it to appear in the navigation bar, however I want to be able to add an external link which will appear in the navigation bar alongside all my internal links, and be editable and re-orderable through the CMS

For example I would like admins to be able to create a menu as follows:

  • Home (internal Sulu page)
  • My account (internal Sulu page)
  • Our parent company (external link)
  • Contact us (internal Sulu page)

Is this possible through sulu or do I need to write an extension?

jamiemax
  • 179
  • 13

1 Answers1

2

That's exactly why we have built the external link page type. In order to use it follow these steps:

  • Create a new page and save it
  • After saving a "Settings" tab will appear
  • Select "External Link" from the "Page Type" Dropdown
  • A field to enter the external URL appears

Mind that when you are doing this, the navigations to choose from in the "Show page in" dropdown is still there. If you choose a navigation there, the external link will appear in the navigation.

Daniel Rotter
  • 1,998
  • 2
  • 16
  • 33
  • As a follow up question, is it possible to have different structures within different navigation contexts - so for example if I wanted a footer menu to display the same pages as the header menu but in a different order? – jamiemax Aug 10 '20 at 10:49
  • @JamieMaxwell Not really... The order in our tree is what is used for navigations as well, to make it easier to handle for users. But as a workaround you could create internal links in the same way, and only assign some of them to each navigation context. But keep in mind that this will bloat your tree. – Daniel Rotter Aug 11 '20 at 07:28