Webmastersite.net
Register Log In

Toplist Help
toplist does not work on subcats of Top Level

Comments on Toplist Help

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 17, 2006 - 2:19 AM:

Sounds like you want parent={CATID} OR parentids LIKE '%|{CATID}|%'

Also I have noticed that this makes the subcat listing in the middle of the page (under the cat heading) disappear.

A toplist shouldn't interfere with anything (unless it's the same number as another). If you have two <!-- BEGIN CATSBODY --> areas though that would be illegal. No idea why you're using twice in addition to a toplist.
joshberm
Nothing is impossible...

Usergroup: Customer
Joined: Aug 07, 2006
Location: Tampa, Florida

Total Topics: 36
Total Comments: 91
Posted Aug 17, 2006 - 8:21 AM:

OK, I am trying this a much simpler way now (with toplists only).
Here's the current code:

<!-- BEGIN TOPLIST 11 -->
<CONFIG>categories,name,99,ascending,parent=0,,,0,0,0,0</CONFIG>
Top Level: {CATNAME}<br>
<!-- END TOPLIST 11 -->

<!-- BEGIN TOPLIST 13 -->
<CONFIG>categories,name,99,ascending,parent={CATID},,,0,0,0,0</CONFIG>
Subs of This: {CATNAME}<br>
<!-- END TOPLIST 13 -->

I cannot get these filters to work in my toplists:
parent={CATID}
parentids='%|{CATID}|%'

Please look at the output to see the problem with parent={CATID}:
www.gowesleychapel.com/dire...ction=displaycat&catid=138


Also, I need help with conditionals in toplists.
I want to say that IF the toplist's cat is the same cat as the one you're currently browsing, THEN that item of the toplist will expand and show its subcats. How do I use {CATID} inside a toplist but make sure that it applies to the browsed page CATID & not the toplist output?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 21, 2006 - 1:27 AM:

The output isn't showing me anything I can tell is wrong. If you're trying to do what I thought you said originally you were doing,
<CONFIG>categories,name,99,ascending,parent={CATID} OR parentids='%|{CATID}|%',,,0,0,0,0</CONFIG>
ought to be what you're looking for, as one toplist.

I want to say that IF the toplist's cat is the same cat as the one you're currently browsing, THEN that item of the toplist will expand and show its subcats.

You can't with conditionals since you're within the scope of the toplist there. You could do it with PHP:
<?php global $thiscategory; if ($thiscategory->id == {CATID}) { ?>
expanded stuff
<?php } ?>


But you can't nest toplists within toplists, which if I understand correctly is what you're trying to do.

Maybe you could make use of the sitemap instead, but the problem is it only works in sitemap.php at the moment.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.