 | |  | | | Classifieds How do I...? Wondering how to do something in Classifieds? |
January 11th, 2009, 09:33 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
| PP Classifieds how do I vary custom3pal.tmpl
I'd like to vary what's in this template depending on what category is currently being displayed. Can this be done?
|
| |
January 12th, 2009, 08:40 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
You can do something like that with conditionals like say Code: Content visible to verified customers only.
would be more like this Code: Content visible to verified customers only.
|
| |
January 12th, 2009, 09:23 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
Hmmm, I tried this and it always seems to evaluate to take the cat = 1 path.
|
| |
January 13th, 2009, 08:52 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
Mine was an example, You need to code it to your site. That way when someone visits one of your categories it will change.
|
| |
January 13th, 2009, 09:31 AM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
What I'm trying to say is that the variable in the example $cat doesn't appear to be valid in that contxt. I know I have to customize it but I need to know that $cat is valid category id's. It appears not to be.
|
| |
January 13th, 2009, 09:38 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
Cat is definately valid on showcat script to my knowledge.
/classifieds/showcat.php?cat=2
|
| |
January 13th, 2009, 08:43 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
Here is my exact code: Code: Content visible to verified customers only.
It always displays "Stuff 1" no matter what category I am browsing. Any ideas anyone?
|
| |
January 14th, 2009, 08:55 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
I dont know I would need to see your site. Are you editing the correct custompal template like if your using vb3 are you editing the one in the vb3enhanced templates directory?
|
| |
January 14th, 2009, 06:24 PM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
Yes, I'm editing the vb3enhanced templates directory. The $cat variable doesn't seem to get evaluated properly. What language are these templates written in. It is a mix of HTML and something else. Perhaps I can get help elsewhere.
|
| |
January 14th, 2009, 06:37 PM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
Taking your code to the letter: Code: Content visible to verified customers only.
No matter what category I browse I see:
PAL TITLE1
Stuff1
Frustrated.....
|
| |
January 15th, 2009, 08:12 AM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
Feel free to discuss code modifications in our code mod forums but also feel free to post a link here for me to see your site. cat is only going to be evaluated on showcat.php and showphoto.php so it all depends what your coding.
|
| |
January 15th, 2009, 08:20 AM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
Try this template
|
| |
January 15th, 2009, 09:54 PM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
It almost works. The $cat are finally getting evaluated properly, but it screwed up my tables in the right hand column. Some of my code that should be in the footer now appears there...... http://www.michigan-sportsman.com/classifieds/
Last edited by wacnstac; January 15th, 2009 at 10:05 PM.
|
| |
January 16th, 2009, 08:08 AM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
I just cut and pasted your code. HMM
I just looked through that template there is nothing out of the ordinary in the html its all valid
Now looking at your source I wonder why $ppcloseside is not being evaluated?
Try changing it to $ppclose in that template
|
| |
January 19th, 2009, 09:33 PM
|
#15 (permalink)
| | Member Verified Customer
Join Date: Apr 2002
Posts: 423
|
The last suggestion did the trick. Thanks Chuck.
|
| |
January 20th, 2009, 08:42 AM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,699
|
Have a good evening.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 01:34 AM. | |