knowing what page we're on in a .TPL

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

knowing what page we're on in a .TPL

Post by randulo »

Hi,

I have a template that uses links at the top of the page. They are mostly categories in the blog. I would like to make these reflect the page we're on so if it's category X that text is not a link and is a different color.

Are there variables that allow this or can I do a test on the current URL to make this happen? I'd know how to do it in php but not in the template.

Ideas and suggestions welcome!

r
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

The bulletproof template has this function built in. Basically what you need to do is copy the relevant php from bulletproofs config.inc.php and also the bits in index.tpl into your own template. Should be about 2 minutes work.
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Post by randulo »

carl_galloway wrote:Basically what you need to do is copy the relevant php from bulletproofs config.inc.php and also the bits in index.tpl into your own template. Should be about 2 minutes work.
I'll take a look Carl, thanks a lot!
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Post by randulo »

I feel like changing my signature top: "Serendipity: It's the people, not the software!"

Thanks Carl and as usual, thanks to Garvin for all he continues to do.
Don Chambers
Regular
Posts: 3659
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

randulo wrote:"Serendipity: It's the people, not the software!"
Amen to that! :D
=Don=
Babysittah
Posts: 1
Joined: Fri Dec 07, 2007 9:22 am

Post by Babysittah »

Thats a good idea yo, I like it:)!
Post Reply