Re: template question: how to show active section innav bar?
[email protected] Thu, 25 Aug 2005 17:07:24 +0200
| Newsgroups | gmane.comp.cms.campsite.general |
|---|---|
| Message-ID | <OF2B463C98.DC3DEC6E-ONC1257068.0052DBB7-C1257068.00530AB5@mdlf.org> |
This is a multipart message in MIME format. --=_alternative 00530AAEC1257068_= Content-Type: text/plain; charset="us-ascii" Thanks Braja! That totally worked. I'll add this to the new, slick online Campsite manual, and am including my navbar.tpl below in final form. - doug <!-- NAV BAR --> <div id="navtabs"> <!** local><!** issue current><!** section number 1> <!** if section fromstart> <span id="navtab_on">[<a href="<!** URI section>">SECTION 1</a>]</span> <!** else> [<a href="<!** URI section>">SECTION 1</a>] <!** endif> <!** endlocal> <!** local><!** issue current><!** section number 2> <!** if section fromstart> <span id="navtab_on">[<a href="<!** URI section>">SECTION 2</a>]</span> <!** else>[<a href="<!** URI section>">SECTION 2</a>] <!** endif> <!** endlocal> <!** local><!** issue current><!** section number 3> <!** if section fromstart> <span id="navtab_on">[<a href="<!** URI section>">SECTION 3</a>]</span> <!** else> [<a href="<!** URI section>">BROCHURES</a>]<!** endif><!** endlocal> <!** local><!** issue current><!** section number 4> <!** if section fromstart><span id="navtab_on">[<a href="<!** URI section>">SECTION 4</a>]</span> <!** else> [<a href="<!** URI section>">SECTION 4</a>] <!** endif> <!** endlocal> </div> Aleksandar Brajanoski <[email protected]> 08/25/05 04:32 PM Please respond to campsite-support To: [email protected] cc: Subject: Re: [campsite-support] template question: how to show active section innav bar? try this: <!** local><!** issue current><!** section number 1> <!** if section fromstart> <div id="navtab_on"> [<a href="<!** URI section>">SECTION 1</a>] </div> <!** else> [<a href="<!** URI section>">SECTION 1</a>] <!** endif> <!** endlocal> [email protected] wrote: > > Hm. I tried this, but it also didn't seem to work. Where are you > suggesting putting the <!** if section fromstart>? Inside the <!** > local directive>? > > <div id="navtabs"> > > <!**if section fromstart is 1> > <div id="navtab_on"> > <!** local><!** issue current><!** section number 1>[<a href="<!** URI > section>">SECTION 1</a>] > <!** endlocal> > </div> > <!** else> > <!** local><!** issue current><!** section number 1> > [<a href="<!** URI section>">SECTION 1</a>] > <!** endlocal> > <!**endif> > > <**if section fromstart is 2> > <div id="navtab_on"> > <!** local><!** issue current><!** section number 2> > [<a href="<!** URI section>">SECTION 2</a>] > <!** endlocal> > </div> > <!** else> > <!** local><!** issue current><!** section number 2> > [<a href="<!** URI section>">SECTION 2</a>] > <!** endlocal> > <!** endif> > > <**if section fromstart is 3> > <div id="navtab_on"> > <!** local><!** issue current><!** section number 3> > [<a href="<!** URI section>">SECTION 3</a>] > <!** endlocal> > </div> > <!** else> > <!** local><!** issue current><!** section number 3> > [<a href="<!** URI section>">SECTION 3</a>] > <!** endlocal> > <!** endif> > > <**if section fromstart is 4> > <div id="navtab_on"> > <!** local><!** issue current><!** section number 4> > [<a href="<!** URI section>">SECTION 4</a>] > <!** endlocal> > </div> > <!** else> > <!** local><!** issue current><!** section number 4> > [<a href="<!** URI section>">SECTION 4</a>] > <!** endlocal> > <!** endif> > > </div> > > Aleksandar Brajanoski > <[email protected]> To: > [email protected] > 08/25/05 03:52 PM cc: > Please respond to Subject: Re: > campsite-support [campsite-support] template question: how > to show active section in nav bar? > > try with <if section fromstart> > > [email protected] wrote: > > > > I want to make a navigation bar, but one that has a different style > > for the current section (the section where the reader is currently) > > than the non-current ones. But when I try to use the example from > the > > CS documentation, it doesn't work, because it's based on <!**local> > > directives. > > > > Here's what I've tried, but it doesn't work. > > > > <div id="navtabs"> > > <!** local><!** issue current><!** section number 1> > > <!**if section is current> > > <div id=navtab_on>[<a href="<!** URI section>">SECTION NAME > > 1</a>]</div> > > <!** else> > > [<a href="<!** URI section>">SECTION NAME 1</a>] > > <!**endif> > > <!** endlocal> > > > > <!** local><!** issue current><!** section number 2> > > <!**if section is current> > > <div id=navtab_on>[<a href="<!** URI section>">SECTION NAME > > 2</a>]</div> > > <!** else> > > [<a href="<!** URI section>">SECTION NAME 2</a>] > > <!** endif> > > <!** endlocal> > > > > <!** local><!** issue current><!** section number 3> > > <!**if section is current> > > <div id=navtab_on>[<a href="<!** URI section>">SECTION NAME > > 3</a>]</div> > > <!** else> > > [<a href="<!** URI section>">SECTION NAME 3</a>] > > <!** endif> > > <!** endlocal> > > > > and so on... > > > > But the <!** if section is current> doesn't seem to work, and all > the > > nav bar items are given the <div> of navtab_on, so it thinks they're > > all current. > > > > Any ideas? > > -- > Aleksandar Brajanoski > Internet Development Manager > Transitions Online > Chlumova 22, 130 00 Praha 3 > Czech Republic > 420 2 2278-0805 (extension 26) > 420 2 2278-0804 (fax) > http://www.tol.cz > > TOL: Intelligent Eastern Europe! -- Aleksandar Brajanoski Internet Development Manager Transitions Online Chlumova 22, 130 00 Praha 3 Czech Republic 420 2 2278-0805 (extension 26) 420 2 2278-0804 (fax) http://www.tol.cz TOL: Intelligent Eastern Europe! --=_alternative 00530AAEC1257068_= Content-Type: text/html; charset="us-ascii" <br><font size=2 face="sans-serif">Thanks Braja!</font> <br> <br><font size=2 face="sans-serif">That totally worked. I'll add this to the new, slick online Campsite manual, and am including my navbar.tpl below in final form. - doug</font> <br> <br> <br><font size=2 face="sans-serif"><!-- NAV BAR --></font> <br> <br><font size=2 face="sans-serif"><div id="navtabs"></font> <br> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 1></font> <br><font size=2 face="sans-serif"><!** if section fromstart></font> <br><font size=2 face="sans-serif"><span id="navtab_on">[<a href="<!** URI section>">SECTION 1</a>]</span></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 1</a>]</font> <br><font size=2 face="sans-serif"><!** endif></font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 2></font> <br><font size=2 face="sans-serif"><!** if section fromstart></font> <br><font size=2 face="sans-serif"><span id="navtab_on">[<a href="<!** URI section>">SECTION 2</a>]</span></font> <br><font size=2 face="sans-serif"><!** else>[<a href="<!** URI section>">SECTION 2</a>]</font> <br><font size=2 face="sans-serif"><!** endif></font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 3></font> <br><font size=2 face="sans-serif"><!** if section fromstart></font> <br><font size=2 face="sans-serif"><span id="navtab_on">[<a href="<!** URI section>">SECTION 3</a>]</span></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">BROCHURES</a>]<!** endif><!** endlocal></font> <br> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 4></font> <br><font size=2 face="sans-serif"><!** if section fromstart><span id="navtab_on">[<a href="<!** URI section>">SECTION 4</a>]</span></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 4</a>]</font> <br><font size=2 face="sans-serif"><!** endif></font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br> <br> <br><font size=2 face="sans-serif"></div></font> <br> <br> <br> <br> <br> <br> <br> <table width=100%> <tr valign=top> <td> <td><font size=1 face="sans-serif"><b>Aleksandar Brajanoski <[email protected]></b></font> <p><font size=1 face="sans-serif">08/25/05 04:32 PM</font> <br><font size=1 face="sans-serif">Please respond to campsite-support</font> <br> <td><font size=1 face="Arial"> </font> <br><font size=1 face="sans-serif"> To: [email protected]</font> <br><font size=1 face="sans-serif"> cc: </font> <br><font size=1 face="sans-serif"> Subject: Re: [campsite-support] template question: how to show active section innav bar?</font></table> <br> <br> <br><font size=2 face="Courier New">try this:<br> <br> <!** local><!** issue current><!** section number 1><br> <!** if section fromstart><br> <div id="navtab_on"><br> [<a href="<!** URI section>">SECTION 1</a>]<br> </div><br> <!** else><br> [<a href="<!** URI section>">SECTION 1</a>]<br> <!** endif><br> <!** endlocal><br> <br> <br> <br> [email protected] wrote:<br> > <br> > Hm. I tried this, but it also didn't seem to work. Where are you<br> > suggesting putting the <!** if section fromstart>? Inside the <!**<br> > local directive>?<br> > <br> > <div id="navtabs"><br> > <br> > <!**if section fromstart is 1><br> > <div id="navtab_on"><br> > <!** local><!** issue current><!** section number 1>[<a href="<!** URI<br> > section>">SECTION 1</a>]<br> > <!** endlocal><br> > </div><br> > <!** else><br> > <!** local><!** issue current><!** section number 1><br> > [<a href="<!** URI section>">SECTION 1</a>]<br> > <!** endlocal><br> > <!**endif><br> > <br> > <**if section fromstart is 2><br> > <div id="navtab_on"><br> > <!** local><!** issue current><!** section number 2><br> > [<a href="<!** URI section>">SECTION 2</a>]<br> > <!** endlocal><br> > </div><br> > <!** else><br> > <!** local><!** issue current><!** section number 2><br> > [<a href="<!** URI section>">SECTION 2</a>]<br> > <!** endlocal><br> > <!** endif><br> > <br> > <**if section fromstart is 3><br> > <div id="navtab_on"><br> > <!** local><!** issue current><!** section number 3><br> > [<a href="<!** URI section>">SECTION 3</a>]<br> > <!** endlocal><br> > </div><br> > <!** else><br> > <!** local><!** issue current><!** section number 3><br> > [<a href="<!** URI section>">SECTION 3</a>]<br> > <!** endlocal><br> > <!** endif><br> > <br> > <**if section fromstart is 4><br> > <div id="navtab_on"><br> > <!** local><!** issue current><!** section number 4><br> > [<a href="<!** URI section>">SECTION 4</a>]<br> > <!** endlocal><br> > </div><br> > <!** else><br> > <!** local><!** issue current><!** section number 4><br> > [<a href="<!** URI section>">SECTION 4</a>]<br> > <!** endlocal><br> > <!** endif><br> > <br> > </div><br> > <br> > Aleksandar Brajanoski<br> > <[email protected]> To:<br> > [email protected]<br> > 08/25/05 03:52 PM cc:<br> > Please respond to Subject: Re:<br> > campsite-support [campsite-support] template question: how<br> > to show active section in nav bar?<br> > <br> > try with <if section fromstart><br> > <br> > [email protected] wrote:<br> > ><br> > > I want to make a navigation bar, but one that has a different style<br> > > for the current section (the section where the reader is currently)<br> > > than the non-current ones. But when I try to use the example from<br> > the<br> > > CS documentation, it doesn't work, because it's based on <!**local><br> > > directives.<br> > ><br> > > Here's what I've tried, but it doesn't work.<br> > ><br> > > <div id="navtabs"><br> > > <!** local><!** issue current><!** section number 1><br> > > <!**if section is current><br> > > <div id=navtab_on>[<a href="<!** URI section>">SECTION NAME<br> > > 1</a>]</div><br> > > <!** else><br> > > [<a href="<!** URI section>">SECTION NAME 1</a>]<br> > > <!**endif></font> <br><font size=2 face="Courier New">> > <!** endlocal><br> > ><br> > > <!** local><!** issue current><!** section number 2><br> > > <!**if section is current><br> > > <div id=navtab_on>[<a href="<!** URI section>">SECTION NAME<br> > > 2</a>]</div><br> > > <!** else><br> > > [<a href="<!** URI section>">SECTION NAME 2</a>]<br> > > <!** endif><br> > > <!** endlocal><br> > ><br> > > <!** local><!** issue current><!** section number 3><br> > > <!**if section is current><br> > > <div id=navtab_on>[<a href="<!** URI section>">SECTION NAME<br> > > 3</a>]</div><br> > > <!** else><br> > > [<a href="<!** URI section>">SECTION NAME 3</a>]<br> > > <!** endif><br> > > <!** endlocal><br> > ><br> > > and so on...<br> > ><br> > > But the <!** if section is current> doesn't seem to work, and all<br> > the<br> > > nav bar items are given the <div> of navtab_on, so it thinks they're<br> > > all current.<br> > ><br> > > Any ideas?<br> > <br> > --<br> > Aleksandar Brajanoski<br> > Internet Development Manager<br> > Transitions Online<br> > Chlumova 22, 130 00 Praha 3<br> > Czech Republic<br> > 420 2 2278-0805 (extension 26)<br> > 420 2 2278-0804 (fax)<br> > http://www.tol.cz<br> > <br> > TOL: Intelligent Eastern Europe!<br> <br> -- <br> Aleksandar Brajanoski<br> Internet Development Manager<br> Transitions Online<br> Chlumova 22, 130 00 Praha 3<br> Czech Republic<br> 420 2 2278-0805 (extension 26)<br> 420 2 2278-0804 (fax)<br> http://www.tol.cz<br> <br> TOL: Intelligent Eastern Europe!<br> </font> <br> <br> --=_alternative 00530AAEC1257068_=--