Current tab in navigation

Hi,

I have a snippet where I store my navigation bar. It’s a bullet list,
and I use CSS to make it looks like a bar, with each link as a button.

Is there a way to have this bar dynamic, where the correct button
while be attached a “current” CSS class appropriately?

Thank you all.

J.

Jonathan,

Take a look at the documentation for the <r:navigation urls="’ > tag.
It should do everything you describe and a little more.

I’ve copied the docs to this bottom of this message, but if you’re on
the current 0.6.0 or 0.6.1 version of Radiant you can find this
documentation right in the new / edit page by clicking on the
“Available Tags” reference link. Also note that if you’re NOT using
0.6.1 (you should be :slight_smile: then you’ll find that the url separator
character is a semi-colon (:wink: not a pipe (|).

Good luck

<r:navigation />

Renders a list of links specified in the urls attribute according to
three states:

 * normal specifies the normal state for the link
 * here specifies the state of the link when the url matches the

current page’s URL
* selected specifies the state of the link when the current page
matches is a child of the specified url

The between tag specifies what sould be inserted in between each of
the links.
Usage:

<r:navigation urls="[Title: url | Title: url | …]">
<r:normal><r:title /></r:normal>
<r:here><r:title /></r:here>
<r:selected><r:title /></
r:selected>
<r:between> | </r:between>
</r:navigation>

Loren J. wrote:

“Available Tags” reference link. Also note that if you’re NOT using
0.6.1 (you should be :slight_smile: then you’ll find that the url separator
character is a semi-colon (:wink: not a pipe (|).

Actually, on 0.6.1 it’s a pipe not a simi-colon.


John L.
http://wiseheartdesign.com

But that’s what I said :wink:

Thanks for the laugh, ya’ll.

On 6/1/07, Loren J. [email protected] wrote:

character is a semi-colon (:wink: not a pipe (|).

Good luck

Again, that’s just what I needed. And yes, I run 0.6.1, and I will NOT
not use the pipe :-p

Radiant and its community rock. Love it.

Thanks a lot.

J.

But… but… the point is to YES USE THE PIPE IN 0.6.1 earlier
versions NO

It’s getting funnier all the time :wink:

On Jun 1, 2007, at 1:21 PM, Loren J. wrote:

Also note that if you’re NOT using
0.6.1 (you should be :slight_smile: then you’ll find that the url separator
character is … not a pipe (|).

Double negatives are hard outside of code, too, I see.

Ha! adam

No they’re not

:wink:

Double negatives are hard outside of code, too, I see.

Ha! adam

Yet another reason to stay away from !! in Ruby.

Sean

Loren J. wrote:

But that’s what I said :wink:

On Jun 1, 2007, at 7:04 AM, John W. Long wrote:

Loren J. wrote:

“Available Tags” reference link. Also note that if you’re NOT using
0.6.1 (you should be :slight_smile: then you’ll find that the url separator
character is a semi-colon (:wink: not a pipe (|).
Actually, on 0.6.1 it’s a pipe not a simi-colon.

Wow. You’re right. You did. There were just too many nots, ors, andors,
and xors in that statement. Not to mention pipes. :wink:


John L.
http://wiseheartdesign.com

Sean C. wrote:

Yet another reason to stay away from !! in Ruby.

That is so !!true. :slight_smile: Except that I do like to use it to convert an
expression into either true or false:

def open?
!!@pipe #if pipe is nil convert it to false
end


John L.
http://wiseheartdesing.com