PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old March 23rd, 2005, 06:54 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Posts: 92
template conditional questions

Lets say i have the page: showimage.php?i=83

from that info, i want to make a template conditional that checks if one of its parent categories is a certain category.

for example:
PATH: Printables > Animals > Color > image83.jpg

can i make a template conditional that checks if this image is in the "Printables" category?

IF so, how?

Thanks, eric
Happy Camper is offline   Reply With Quote
Old March 23rd, 2005, 09:51 AM   #2 (permalink)
Brian
Guest
 
Posts: n/a
Re: template conditional questions

Look in your showimage.php file for this:
Code:
Content visible to verified customers only.
Replace witht this:
Code:
Content visible to verified customers only.
Then you'll be able to use $image['parent'] in your if condition.
  Reply With Quote
Old March 23rd, 2005, 07:48 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Posts: 92
Re: template conditional questions

Thanks, i'll give that a try
Happy Camper is offline   Reply With Quote
Old March 24th, 2005, 06:06 AM   #4 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Posts: 92
Re: template conditional questions

That gives me the id for the immediate parent. but what if i am a few categories deep and i need to know what the upper most parent is? is that possible?

for example, if i am here:
Printables > Animals > Color > image83.jpg

how can i find the id for Printables, not Color?

Thanks
eric
Happy Camper is offline   Reply With Quote
Old March 24th, 2005, 09:59 AM   #5 (permalink)
Brian
Guest
 
Posts: n/a
Re: template conditional questions

Not sure that can be done with an if condition.
  Reply With Quote
Old March 24th, 2005, 10:00 AM   #6 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Posts: 92
Re: template conditional questions

ok, thanks. no big deal.
Happy Camper is offline   Reply With Quote
Old March 24th, 2005, 02:56 PM   #7 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Posts: 75
Re: template conditional questions

The script is generating the breadcrumb which contains all the category tree IDs... can't you tap into that?
zenithrs@bigpon is offline   Reply With Quote
Old March 24th, 2005, 05:12 PM   #8 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Posts: 92
Re: template conditional questions

good point. is that possible?
Happy Camper is offline   Reply With Quote
Old March 24th, 2005, 06:58 PM   #9 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Posts: 75
Re: template conditional questions

You'd have to check it with a code hack. Template conditionals don't give you the string functions you'd need.

It would be handy to have a photo's category tree available in an array so it can be used in template conditionals.
zenithrs@bigpon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what template is this in..?? ncg ReviewPost Installation & Upgrades 1 August 7th, 2005 09:55 PM
image owner conditional? imported_rrr How Do I? - vBulletin 3.0.X 5 March 29th, 2005 12:21 PM
Gallery Conditional.... imported_theMusicMan How Do I? - vBulletin 3.0.X 10 March 28th, 2005 11:06 AM
Enclose "Images in category" and "display options" in a conditional tag? rbl How Do I? - vBulletin 3.0.X 2 January 15th, 2005 11:50 AM
My Suff conditional Fiber How Do I? - vBulletin 3.0.X 1 January 10th, 2005 11:16 AM


All times are GMT -5. The time now is 04:07 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0