What I would like is to add the same content to a group of categories.
I know you can use templates to do this and this works fine, but I would like to use the same content for all underlying categories as well. And use different content for another top category and its underlying categories etc. etc.
Is there an easy way to do this, or do you have to edit each single category and specify the template.
Now the categories beneath category 1 is showing content 1 + 2 +3. Now the categories beneath category 2 is showing content 2 + 3. Now the categories beneath category 3 is showing content 2 + 3.
Already tried adding <OTHERWISE> before </IF>, but this did't seem to help.
Must have done something wrong, just don't know what...
Have tried the correct spelling, no changes, works the same.
If I only use <IF {CATISBENEATH[1]}>content</IF> it works like a charm. The specific content is only shown in that category and all of them below in the directory structure.
Again, works like a charm! Hate to bother you again, but there is one last thing that is not quit working as it should...
It seems that the content, as specified by <IF {CATISBENEATH[1]}>, is also shown on the main page. I have tried to exclude it by using <IF {CATID} is not 0>, but that didn't help. Any ideas?
Comments on Adding content to specific categories
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
What I would like is to add the same content to a group of categories.
I know you can use templates to do this and this works fine, but I would like to use the same content for all underlying categories as well. And use different content for another top category and its underlying categories etc. etc.
Is there an easy way to do this, or do you have to edit each single category and specify the template.
Thanks for any help.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Use conditionals, <IF {CATISBENETH[x]}>content</IF> where x is the category id number.
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
Thanks for that Paul, however it does not yet seem to work properly for me.
I am using the conditionals in the Wrapper and did as follows.
<IF {CATISBENETH[1]}>content 1</IF>
<IF {CATISBENETH[2]}>content 2</IF>
<IF {CATISBENETH[3]}>content 3</IF>
Now the categories beneath category 1 is showing content 1 + 2 +3.
Now the categories beneath category 2 is showing content 2 + 3.
Now the categories beneath category 3 is showing content 2 + 3.
Already tried adding <OTHERWISE> before </IF>, but this did't seem to help.
Must have done something wrong, just don't know what...
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You haven't specified a version number. Also tell me what putting {CATISBENETH[1]} alone in a template shows (should be 1 or 0).
Edit: Just see scripts.webmastersite.net/w...inks/wsnmanual/articles/11 in the future, it appears I made a spelling error in this thread.
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
Sorry, version nr. is 3.12RC
Have tried the correct spelling, no changes, works the same.
If I only use <IF {CATISBENEATH[1]}>content</IF> it works like a charm. The specific content is only shown in that category and all of them below in the directory structure.
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
Just upgraded to 3.14 and all is working great with no changes being made!
Thanks for all the help!
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
Got another question..
Is it possible to exlude certain categories, so one of the categories beneath the one specified by <IF {CATISBENEATH[1]} is excluded.
Thanks.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Just nest the conditionals:
<IF {CATISBENEATH[1]}>
<IF {CATID} is not 5>
stuff
</IF>
</IF>
(Might work with <IF {CATISBENEATH[1]} and {CATID} is not 5> too but long conditionals tend to be buggy.)
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
Again, works like a charm!
Hate to bother you again, but there is one last thing that is not quit working as it should...
It seems that the content, as specified by <IF {CATISBENEATH[1]}>, is also shown on the main page. I have tried to exclude it by using <IF {CATID} is not 0>, but that didn't help. Any ideas?
Beginner
Usergroup: Customer
Joined: Aug 20, 2004
Total Topics: 2
Total Comments: 9
Never mind my last post, messed something up myself....
All is working great!
Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
Paul is it possible to include in a future version another variable: CATISNOTBENEATH[x]??
Because I need to do the inverse... I don't want certain HTML to show up if its below a certain category....
Thanks
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Read the template conditionals article in the manual and you'll see that you can use "not" in order to show things where a variable is not true.
Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
as in <IF not {CATISBENEATH[1]}>show stuff</IF>?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Yes.
Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
OK. one more Q: can I combine several categories into that statement:
<IF not {CATISBENEATH[1,10,27]}>show stuff</IF>
or something like that? Reason being that there is more than one category where the scenario I have applies....