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.

Archive /

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

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

Navigation Variables - is this is all there is?


Reply


4 Posts   1438 Views

Avatar
sarahk

Community Member, 46 Posts

1 May 2008 at 12:45pm

Edited: 01/05/2008 12:48pm

According to [url=http://doc.silverstripe.com/doku.php?id=tutorial:1-building-a-basic-site#making_a_navigation_system]Tutorial: Making a Navigation System[/url] 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, 5513 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.