Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Second Navigation with Translations?


Go to End


3 Posts   1560 Views

Avatar
oleze

Community Member, 65 Posts

6 August 2010 at 6:09am

Hey there!
I need some help with a second menu. For my new project, I need a second navigation bar with some special pages like "about", "jobs" or whatever. Until now, I always made the ul static within the template so that it wasn't controlled by the system. Then I unchecked the "show up in menus" button in the backend. Actually I need translations now, so the title of the links need to change between German and English. The static method doesn't work for that because I can't get the page titles out of the database based on the current selected language.
These pages aren't children of the others so a normal "SecondLevelNavigation" isn't needed. Is it possible to do what I need? (Second Root Page on my SiteTree or someting like that?).

Greetz
Oliver

Avatar
oleze

Community Member, 65 Posts

8 August 2010 at 1:10am

I solved the problem by using the trunk build of the CustomMenus Module. It didn't work for the first time I installed it, I had to write the titles of the backend-tabs into the code (they were missing before) so it didn't show up correctly.

Avatar
oleze

Community Member, 65 Posts

18 August 2010 at 1:16am

Because the Custom-Menus Module seems to make more and more problems when switching the language on a page I decided to change my top-menu within the code. To do so, I'm checking the current language with

<% if Locale = de_DE %>

and changing the HTML code within the if-clause.