Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-12 11:14:27

stopsatgreen
Member
Registered: 2008-07-03
Posts: 50

[Solved] Show current position in navigation

Apologies in advance if this has been asked and answered, but is there a way to indicate your current position in an article list? That is, if you have three articles:

<li>One</li>
<li>Two</li>
<li>Three</li>

And you are currently viewing Two, to show that in the list:

<li>One</li>
<li class=“active”>Two</li>
<li>Three</li>

I’m sure it must be straightforward, but I can’t seem to work it out. I can style it in the css, but that’s not what I want to do.

Last edited by stopsatgreen (2008-08-12 11:49:15)

Offline

#2 2008-08-12 11:25:44

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [Solved] Show current position in navigation

Offline

#3 2008-08-12 11:36:08

stopsatgreen
Member
Registered: 2008-07-03
Posts: 50

Re: [Solved] Show current position in navigation

Hmmm… that looks like what I want, but it doesn’t seem to work. I have it installed, and I used this code in my article_listing form:

<li<txp:rvm_if_this_article> class=“active”</txp:rvm_if_this_article>><txp:permlink><txp:title /></txp:permlink></li>

But there’s no end result. Am I missing something?

Sorry, forget that; it does work, on all except the very first item in the list. Is that a known bug?

Forget all of that, it works fine! Thanks very much.

Last edited by stopsatgreen (2008-08-12 11:49:00)

Offline

Board footer

Powered by FluxBB