Page 1 of 1

knowing what page we're on in a .TPL

Posted: Mon Dec 03, 2007 2:24 pm
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

Posted: Mon Dec 03, 2007 3:01 pm
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.

Posted: Mon Dec 03, 2007 3:02 pm
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!

Posted: Mon Dec 03, 2007 5:16 pm
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.

Posted: Mon Dec 03, 2007 5:34 pm
by Don Chambers
randulo wrote:"Serendipity: It's the people, not the software!"
Amen to that! :D

Posted: Fri Dec 07, 2007 9:33 am
by Babysittah
Thats a good idea yo, I like it:)!