View Full Version : How do I put a custom block at the top of specific categories?
January 6th, 2005, 01:52 PM
You showed this to me back in the beta period but I think the thread was deleted when you went to RC :D
What I'm trying to do (again) is add a banner on specific category pages and any image pages that belong to the specified category.
Would/was it as simple as a template conditional?
if (catid=x || catid=y || catid=z)
January 6th, 2005, 02:33 PM
Yup, that should do the trick.
January 6th, 2005, 03:01 PM
Which templates and if you don't mind, what's the exact code (I'm great at pseudo-code, not so great at the real deal) :D
January 6th, 2005, 03:06 PM
<if condition="in_array($catid, array(X,Y,Z))">
January 6th, 2005, 03:57 PM
I also added the code to the 'ADV_GALLERY_SHOWIMAGE' template... exactly what I was looking for.
January 6th, 2005, 04:05 PM
You should probably use $image['catid'] in your showimage template. I may be wrong and just have forgotten that it's in there, but I don't believe that $catid is used there.
January 6th, 2005, 04:15 PM
Is there any downside to keeping it the original way? I ask because it is working fine as is :D
January 6th, 2005, 04:20 PM
Try going to one of the images from the What's New section (or anywhere really other than from browsing the category) and you shouldn't see the banner.
January 6th, 2005, 04:55 PM
Right you are :D
And the updated code you provided works great, thanks!
Now I'm off to make another support ticket for you as I'd like to try the new photopost import script you mentioned elsewhere on my other site :D
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.