PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds How do I...? (http://www.photopost.com/forum/classifieds-how-do-i/)
-   -   PP Classifieds how do I vary custom3pal.tmpl (http://www.photopost.com/forum/classifieds-how-do-i/138920-pp-classifieds-how-do-i-vary-custom3pal-tmpl.html)

wacnstac January 11th, 2009 09:33 PM

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?

Chuck S January 12th, 2009 08:40 AM

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.

wacnstac January 12th, 2009 09:23 PM

Hmmm, I tried this and it always seems to evaluate to take the cat = 1 path.

Chuck S January 13th, 2009 08:52 AM

Mine was an example, You need to code it to your site. That way when someone visits one of your categories it will change.

wacnstac January 13th, 2009 09:31 AM

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.

Chuck S January 13th, 2009 09:38 AM

Cat is definately valid on showcat script to my knowledge.

/classifieds/showcat.php?cat=2

wacnstac January 13th, 2009 08:43 PM

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?

Chuck S January 14th, 2009 08:55 AM

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?

wacnstac January 14th, 2009 06:24 PM

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.

wacnstac January 14th, 2009 06:37 PM

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.....

Chuck S January 15th, 2009 08:12 AM

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.

Chuck S January 15th, 2009 08:20 AM

1 Attachment(s)
Try this template

wacnstac January 15th, 2009 09:54 PM

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/

Chuck S January 16th, 2009 08:08 AM

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

wacnstac January 19th, 2009 09:33 PM

The last suggestion did the trick. Thanks Chuck.

Chuck S January 20th, 2009 08:42 AM

Have a good evening.


All times are GMT -5. The time now is 06:19 AM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97