Jump to:

3439 Posts in 1028 Topics by 869 members

Template Questions

SilverStripe Forums » Template Questions » Second Navigation with Translations?

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

Page: 1
Go to End
Author Topic: 895 Views
  • oleze
    Avatar
    Community Member
    65 Posts

    Second Navigation with Translations? Link to this post

    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

  • oleze
    Avatar
    Community Member
    65 Posts

    Re: Second Navigation with Translations? Link to this post

    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.

  • oleze
    Avatar
    Community Member
    65 Posts

    Re: Second Navigation with Translations? Link to this post

    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.

    895 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.