Is there an easy way of making all subcategories od individual main categories related to each other without having to go to each sub category and paste the category ID numbers in?
Not that I can think of, except that you might be better served to just place a toplist of subcategories from the other category instead of using the related items option.
Thinking futher though, will what you have suggested work on all pages showing links in a sub cat such as this? http://www.accommodation-uk.net/aberdeenshire/aberdeen/ ? Will that page show all of the sub categories of the group that this page exists in? And also do the same for the other similar pages in the other cats? I am now not sure if I have explained very well.
Once you type in the correct box it'll be the 5th term in the generated config line. Not sure what box exactly you did type it in for it to end up as 15th.
The solution is perfect for the sub-sub categories but how do I stop it showing on the sub categories - after all they both run off the same template don't they.
This first one doesn't work because I think your category levels are not greater than 1. You could use that example if you changed <IF {CATLEVELSDEEP} is greater than 1> to <IF {CATLEVELSDEEP} is 1> or <IF {CATLEVELSDEEP} is less than 2>
Be careful using any of these though because if you add new levels in your category structure they will stop working.
If I were you I would create a custom field for categories called showrelated and then edit every category you wish to show related categories in, and type the word "yes" into that field for each of those categories. You could then use...
<IF {CATSHOWRELATED} is yes>
and have full control over which categories show the toplist
0/5
1
2
3
4
5
Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.
Comments on Related Categories question
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
Hi,
Is there an easy way of making all subcategories od individual main categories related to each other without having to go to each sub category and paste the category ID numbers in?
Thanks,
Jez.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Not that I can think of, except that you might be better served to just place a toplist of subcategories from the other category instead of using the related items option.
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
Ok, I will try that. Can you give any pointers? I haven't done anything with toplists.
Thanks Paul.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Use the toplist generator, and in the condition box type
parent=5
to show subcategories of category #5.
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
Paul,
I can't get this to work at all. I have no idea what I am doing wrong. I read the page scripts.webmastersite.net/w...uction-to-toplists-15.html and am none the wiser.
Thinking futher though, will what you have suggested work on all pages showing links in a sub cat such as this? http://www.accommodation-uk.net/aberdeenshire/aberdeen/ ? Will that page show all of the sub categories of the group that this page exists in? And also do the same for the other similar pages in the other cats? I am now not sure if I have explained very well.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Post what you're copying into your template and I'd comment, but I can't comment on nothing.
By group do you mean category type? In that case, parent=5 AND type='categorytypename'
If it's supposed to apply to all categories, replace 5 with {CATID}.
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
Paul,
This is what I am pasting. I have obviously missed some paramount info:
This was after some seriously random mucking around. I haven't grasped this at all.
Hope you can help
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You're typing in the wrong boxes. parent={CATID} is the filtering condition, it needs to be typed where the page asks for a filtering condition: http://www.webmastersite.net/screenshots/3038.jpg
Once you type in the correct box it'll be the 5th term in the generated config line. Not sure what box exactly you did type it in for it to end up as 15th.
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
I finally got there! Thanks Paul.
For my next question...
The solution is perfect for the sub-sub categories but how do I stop it showing on the sub categories - after all they both run off the same template don't they.
E.G: http://www.accommodation-uk.net/north-yorkshire/whitby/ - perfect
http://www.accommodation-uk.net/north-yorkshire/ - not as perfect
Jez
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
This should do it:
<IF {CATLEVELSDEEP} is greater than 1>
[toplist and any other content goes here]
</IF>
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
I couldn't get that to work Paul
Here's what I tried:
<IF {CATLEVELSDEEP} is greater than 1>
[<p><strong>Other Categories in this county that may be of interest</strong></p>
<!-- BEGIN TOPLIST 8 -->
<CONFIG>categories,name,50,ascending,parent={CATPARENT},,,0,0,0,0,0,0,,0</CONFIG>
<a href="{CATURL}"class="categoryname">{CATNAME}</a><br >
<!-- END TOPLIST 8 -->
]</IF>
and
<IF {CATLEVELSDEEP} is greater than 1>
<p><strong>Other Categories in this county that may be of interest</strong></p>
<!-- BEGIN TOPLIST 8 -->
<CONFIG>categories,name,50,ascending,parent={CATPARENT},,,0,0,0,0,0,0,,0</CONFIG>
<a href="{CATURL}"class="categoryname">{CATNAME}</a><br >
<!-- END TOPLIST 8 -->
</IF>
(without square brackets)
I tried it without the Begin and End toplist 8 comments too, just in case. As well as outside the <p>text etc
What did I do wrong?
Jez
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
What were the square brackets in your first example all about?
Anyway, lets try and sort this mess out for ya....
<IF {CATLEVELSDEEP} is greater than 1>
<p><strong>Other Categories in this county that may be of interest</strong></p>
<!-- BEGIN TOPLIST 8 -->
<CONFIG>categories,name,50,ascending,parent="{CATPARENT}",,,0,0,0,0,0,0,,0</CONFIG>
<a href="{CATURL}" class="categoryname">{CATNAME}</a><br >
<!-- END TOPLIST 8 -->
</IF>
Remember to make your toplist number unique on the page. two toplists with the same number wont work at all.
If the categories themselves (the ones where you want to display the toplist do not have sub categories of thier own, try...
<IF {CATNUMSUBCATS} is less than 1>
<p><strong>Other Categories in this county that may be of interest</strong></p>
<!-- BEGIN TOPLIST 8 -->
<CONFIG>categories,name,50,ascending,parent="{CATPARENT}",,,0,0,0,0,0,0,,0</CONFIG>
<a href="{CATURL}" class="categoryname">{CATNAME}</a><br >
<!-- END TOPLIST 8 -->
</IF>
Forum Regular
Usergroup: Customer
Joined: Jan 19, 2007
Total Topics: 32
Total Comments: 130
Thanks Jayweb, that works great. The first one didn't play but the second one which seems a better idea anyway works well. I appreciate it.
What were the square brackets in your first example all about?
Lol, they were from Pauls example - just showing where the content was supposed to go - but I thought I better check :-)
Jez.
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
This first one doesn't work because I think your category levels are not greater than 1. You could use that example if you changed <IF {CATLEVELSDEEP} is greater than 1> to <IF {CATLEVELSDEEP} is 1> or <IF {CATLEVELSDEEP} is less than 2>
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Be careful using any of these though because if you add new levels in your category structure they will stop working.
If I were you I would create a custom field for categories called showrelated and then edit every category you wish to show related categories in, and type the word "yes" into that field for each of those categories. You could then use...
<IF {CATSHOWRELATED} is yes>
and have full control over which categories show the toplist