Re: template question: how to show active section innav bar?
Aleksandar Brajanoski <[email protected]> Thu, 25 Aug 2005 16:32:43 +0200
| Newsgroups | gmane.comp.cms.campsite.general |
|---|---|
| Message-ID | <[email protected]> |
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!