Re: template question: how to show active section in nav bar?
[email protected] Thu, 25 Aug 2005 15:57:06 +0200
| Newsgroups | gmane.comp.cms.campsite.general |
|---|---|
| Message-ID | <OFF9F96EBF.98A3655C-ONC1257068.004C6894-C1257068.004C9ACB@mdlf.org> |
This is a multipart message in MIME format. --=_alternative 004C9AC5C1257068_= Content-Type: text/plain; charset="us-ascii" 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]> 08/25/05 03:52 PM Please respond to campsite-support To: [email protected] cc: Subject: Re: [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! --=_alternative 004C9AC5C1257068_= Content-Type: text/html; charset="us-ascii" <br><font size=2 face="sans-serif">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>?</font> <br> <br><font size=2 face="sans-serif"><div id="navtabs"></font> <br> <br><font size=2 face="sans-serif"><!**if section fromstart is 1></font> <br><font size=2 face="sans-serif"><div id="navtab_on"></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 1>[<a href="<!** URI section>">SECTION 1</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"></div></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 1></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 1</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"><!**endif></font> <br> <br><font size=2 face="sans-serif"><**if section fromstart is 2></font> <br><font size=2 face="sans-serif"><div id="navtab_on"></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 2></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 2</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"></div></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 2></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 2</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"><!** endif></font> <br> <br><font size=2 face="sans-serif"><**if section fromstart is 3></font> <br><font size=2 face="sans-serif"><div id="navtab_on"></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 3></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 3</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"></div></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 3></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 3</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"><!** endif></font> <br> <br><font size=2 face="sans-serif"><**if section fromstart is 4></font> <br><font size=2 face="sans-serif"><div id="navtab_on"></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 4></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 4</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"></div></font> <br><font size=2 face="sans-serif"><!** else></font> <br><font size=2 face="sans-serif"><!** local><!** issue current><!** section number 4></font> <br><font size=2 face="sans-serif">[<a href="<!** URI section>">SECTION 4</a>]</font> <br><font size=2 face="sans-serif"><!** endlocal></font> <br><font size=2 face="sans-serif"><!** endif></font> <br> <br><font size=2 face="sans-serif"></div></font> <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 03:52 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 in nav bar?</font></table> <br> <br> <br><font size=2 face="Courier New">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 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><br> > <!** 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 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> </font> <br> <br> --=_alternative 004C9AC5C1257068_=--