template question: how to show active section in nav bar?

[email protected] Thu, 25 Aug 2005 14:42:24 +0200
Newsgroups gmane.comp.cms.campsite.general
Message-ID <OF724C6C35.51F32831-ONC1257068.0045824E-C1257068.0045C43B@mdlf.org>
This is a multipart message in MIME format.
--=_alternative 0045C435C1257068_=
Content-Type: text/plain; charset="us-ascii"

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?
--=_alternative 0045C435C1257068_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">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 &lt;!**local&gt; directives.</font>
<br>
<br><font size=2 face="sans-serif">&nbsp;Here's what I've tried, but it doesn't work.</font>
<br>
<br><font size=2 face="sans-serif">&lt;div id=&quot;navtabs&quot;&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** local&gt;&lt;!** issue current&gt;&lt;!** section number 1&gt;</font>
<br><font size=2 face="sans-serif">&lt;!**if section is current&gt;</font>
<br><font size=2 face="sans-serif">&lt;div id=navtab_on&gt;[&lt;a href=&quot;&lt;!** URI section&gt;&quot;&gt;SECTION NAME 1&lt;/a&gt;]&lt;/div&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** else&gt;</font>
<br><font size=2 face="sans-serif">[&lt;a href=&quot;&lt;!** URI section&gt;&quot;&gt;SECTION NAME 1&lt;/a&gt;]</font>
<br><font size=2 face="sans-serif">&lt;!**endif&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** endlocal&gt;</font>
<br>
<br><font size=2 face="sans-serif">&lt;!** local&gt;&lt;!** issue current&gt;&lt;!** section number 2&gt;</font>
<br><font size=2 face="sans-serif">&lt;!**if section is current&gt;</font>
<br><font size=2 face="sans-serif">&lt;div id=navtab_on&gt;[&lt;a href=&quot;&lt;!** URI section&gt;&quot;&gt;SECTION NAME 2&lt;/a&gt;]&lt;/div&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** else&gt;</font>
<br><font size=2 face="sans-serif">[&lt;a href=&quot;&lt;!** URI section&gt;&quot;&gt;SECTION NAME 2&lt;/a&gt;]</font>
<br><font size=2 face="sans-serif">&lt;!** endif&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** endlocal&gt;</font>
<br>
<br><font size=2 face="sans-serif">&lt;!** local&gt;&lt;!** issue current&gt;&lt;!** section number 3&gt;</font>
<br><font size=2 face="sans-serif">&lt;!**if section is current&gt;</font>
<br><font size=2 face="sans-serif">&lt;div id=navtab_on&gt;[&lt;a href=&quot;&lt;!** URI section&gt;&quot;&gt;SECTION NAME 3&lt;/a&gt;]&lt;/div&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** else&gt;</font>
<br><font size=2 face="sans-serif">[&lt;a href=&quot;&lt;!** URI section&gt;&quot;&gt;SECTION NAME 3&lt;/a&gt;]</font>
<br><font size=2 face="sans-serif">&lt;!** endif&gt;</font>
<br><font size=2 face="sans-serif">&lt;!** endlocal&gt;</font>
<br>
<br><font size=2 face="sans-serif">and so on...</font>
<br>
<br><font size=2 face="sans-serif">But the &lt;!** if section is current&gt; doesn't seem to work, and all the nav bar items are given the &lt;div&gt; of navtab_on, so it thinks they're all current.</font>
<br>
<br><font size=2 face="sans-serif">Any ideas?</font>
--=_alternative 0045C435C1257068_=--