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.

Archive /

Our old forums are still available as a read-only archive.

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

Navigation Variables - is this is all there is?


Go to End


4 Posts   1695 Views

Avatar
sarahk

Community Member, 46 Posts

1 May 2008 at 12:45pm

Edited: 01/05/2008 12:48pm

According to Tutorial: Making a Navigation System when I'm in the navigation loop I have the following variables to work with

* $Link
* $Title
* $MenuTitle
* $LinkingMode

Are there any other variables?

I'd really like to know the type of page and be able to use the CSS to format the link accordingly.

thanks :)

Avatar
Willr

Forum Moderator, 5523 Posts

1 May 2008 at 8:04pm

you have access to every field on that pages object. See the lists at the right down the bottom of the page - http://doc.silverstripe.com/doku.php?id=built-in-page-controls for a complete list

Avatar
sarahk

Community Member, 46 Posts

1 May 2008 at 11:01pm

Thanks Will

$ClassName is what I was looking for.

Seems I'll need to create an extension of the contact page as I have 2 on the nav and only one needs to be highlighted. In the CMS you have userdefinedform in a pagetypes folder. If I'm going to "extend" that type does it go in my code folder or do I need to copy the folder structure from cms?

Avatar
Sean

Forum Moderator, 922 Posts

1 May 2008 at 11:04pm

Seems I'll need to create an extension of the contact page as I have 2 on the nav and only one needs to be highlighted. In the CMS you have userdefinedform in a pagetypes folder. If I'm going to "extend" that type does it go in my code folder or do I need to copy the folder structure from cms?

You should be able to do the former - put it into your code folder.