Start ::
PostNuke 0.7 Support ::
XTE Support ::
Setting Active Links to a Nav bar
Moderated by: Support Team
-
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Currently it is slipping my mind...
What I am trying to do is get the module name assign a variable to it, check it against link name, to assign the active link...
Any Ideas?
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnSoftmore
- registered:
- April 2005
- Status:
- offline
- last visit:
- 04.05.08
- Posts:
- 96
-
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 24.04.08
- Posts:
- 7647
Xanthia already assigns the top-level module name as a template variable named $module.
To see what variables are available in any template add the pndebug tag to that template. A popup will appear (if your a site admin) containing all available template variables.
-Mark -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
And of course, I knew this... Seems, I forgot it though
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Perfect!
For anyone interested in the code... Also, to set the home page use $mainpage
Thanks Guys!
edited by: AmmoDump, Aug 14, 2007 - 12:05 AM
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Or... I love this:
Now in the CSS we add the following...
Thus we eliminate the conditional statements, save the main page. The styles need to be added, but I think this is a cleaner solution.
edited by: AmmoDump, Aug 14, 2007 - 12:21 AM
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnFreshman
- registered:
- January 2008
- Status:
- offline
- last visit:
- 25.04.08
- Posts:
- 22
I would welcome some advice on the following:
I am using the Andreas08 theme in 0.8.0.0-RC2
The nav bar consists of a number of seperate links to individual pages in the new content module, for example one link will go to Content&func=view&pid=1 and another to Content&func=view&pid=2.
If I use all the content links are shown as active. How do I show the different pids in the above code to only show one active link ?
-----
David -
- rank:
-
pnSoftmore
- registered:
- July 2004
- Status:
- offline
- last visit:
- 23.03.08
- Posts:
- 89
-
- rank:
-
pnFreshman
- registered:
- January 2008
- Status:
- offline
- last visit:
- 25.04.08
- Posts:
- 22
Herr.Vorragend many thanks for your quick reply it is appreciated.
A bit new to this so I am still a bit confused so where in my theme template do I place
This is from my existing theme template:
-----
David -
- rank:
-
pnSoftmore
- registered:
- July 2004
- Status:
- offline
- last visit:
- 23.03.08
- Posts:
- 89
Somewhere at the top of the theme/template:
Now you have to variables: $module and $pid.
edited by: Herr.Vorragend, Jan 23, 2008 - 04:00 PM
-----
www.carsten-volmer.de
Unternehmensberatung Volmer -
- rank:
-
pnProfessional
- registered:
- September 2006
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 913
I preffer to manage this with a simple plugin.
An example of the think i do is in my alpha blanktheme (available here).
-----
- Mateo T. -
Mis principios... son mis fines -
- rank:
-
pnFreshman
- registered:
- January 2008
- Status:
- offline
- last visit:
- 25.04.08
- Posts:
- 22
Thanks Herr.Vorragend. The template variable named $module was already assigned so I only needed to assign the $pid variable and all now works as it should.
Mateo thanks very much for your comments. I have downloaded a copy of your blank theme and will try it out.
-----
David -
- rank:
-
pnHelper
- registered:
- March 2005
- Status:
- offline
- last visit:
- 30.04.08
- Posts:
- 124
This is an excellent guide on setting active links. I would add that Smarty doesn't seem to like = but rather eq.
So I used the following:
-
Start ::
PostNuke 0.7 Support ::
XTE Support ::
Setting Active Links to a Nav bar
