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.

Data Model Questions /

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

[SOLVED] Extending the navigation


Go to End


2 Posts   1466 Views

Avatar
stevenlangbroek

Community Member, 3 Posts

14 November 2009 at 4:11am

Edited: 28/11/2009 1:23am

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!

Avatar
bummzack

Community Member, 904 Posts

14 November 2009 at 10:19am

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