View Full Version : Custom category template?
Jaxia
03-27-2007, 04:48 AM
Is it possible to set up a custom template per category? For example, have the header image rotate to a dog if they are in the pet category, or the colors change?
I couldn't find any info on whether or not this is possible.
Thanks!
shadav
03-27-2007, 04:58 AM
i believe you would need to make a custom template for each category with the image you'd want
and then in your header.tpl file wherever you want the image to be displayed, put something like this (i think)
Content visible to registered users only.
and do that for each and every category id number
Content visible to registered users only.
Content visible to registered users only.
that's the only way that I can think it could be done.....
Jaxia
03-27-2007, 05:24 AM
Ah, very interesting. I wonder if I can do it with the css file. That would allow more options.
Thanks for the prompt response!
/goes off to ponder taking over the world and other piddly things
DaDon
12-27-2007, 07:58 PM
Hello shadav (http://www.phplinkdirectory.com/forum/member.php?u=4376)
Thanks for your response to this query which has been very useful to me.
I wanted to add the {Or} condition under the {if} but do not know how to do it.
I have triedContent visible to registered users only.But it doesn't seem to recognise the {OR} condition. Any suggestions how I can achieve what I want to do?
bruleo
12-27-2007, 09:59 PM
Content visible to registered users only.
There is a MUCH simpler way, if it's just an image you want for each category. All you need to do is....
Content visible to registered users only.
Just place that in the main.tpl where you want the image to appear and give each category image the name of the category ID (i.e. "0.gif") and place in the relevent directory on your server.
Of course you would need an image for every category, otherwise you will get the red x where an image doesn't exist, unless you create a blank, but that's how I did it at www.u-hits.com (http://www.u-hits.com). Take a look at http://www.u-hits.com/regional/ and browse the categories to see it working.
Bruce.
DaDon
12-27-2007, 10:32 PM
Thanks bruleo (http://www.phplinkdirectory.com/forum/member.php?u=7940). But what I really want is the Smarty statement/condition for "or". I do not want to show a category image: just to display a different header for two specific categories.
The moment the following code works:-
Content visible to registered users only. But when I add the following "or" statement it gives me an error message.
Content visible to registered users only.So, it's the "or" statement bit I need help with. Any other suggestion?
James
12-27-2007, 11:32 PM
it is elseif not or :)
DaDon
12-27-2007, 11:42 PM
Thanks Dawzz! That worked perfectly. I must say I am really impressed with the relative ease with which one can customise phpLD...
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.