Jump to:

3428 Posts in 1056 Topics by 733 members

Data Model Questions

SilverStripe Forums » Data Model Questions » [SOLVED] Extending the navigation

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

Page: 1
Go to End
Author Topic: 853 Views
  • stevenlangbroek
    Avatar
    Community Member
    3 Posts

    [SOLVED] Extending the navigation Link to this post

    Hi,

    I hope i'm not asking an absolute noob-question, as it's my first post here while working on my first silverstripe-project. I have rtfm, and tried to Google for an answer, so please don't flame me.

    I want to do the following: add a "subtitle" to navigation-items, which can be admin-ed in the CMS. The main $MenuTitle would end up in an <h2>-tag, followed by the subtitle ($MenuSubTitle?).

    Thanks in advance!

  • banal
    Avatar
    Community Member
    901 Posts

    Re: [SOLVED] Extending the navigation Link to this post

    Hi
    You can simply add a new Field to the CMS, by adding it to the $db array and the required input field in the getCMSFields method.
    Pretty much like described in Tutorial 2: http://doc.silverstripe.org/doku.php?id=tutorial:2-extending-a-basic-site#adding_date_and_author_fields

    These fields can also be accessed in the navigation. The name (eg. MenuSubTitle) is entirely up to you (as long as it doesn't conflict with existing field-names).

    Good luck

    853 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.