Current Page CSS class
Posted Jan 17, 2013 - 1:25 PM:
I've created a category menu using a toplist.... I want a different CSS class if in the menu for the current viewed catgory so that the button can be a different colour. I tried...
class="menu-item <IF {THISCATID} is {CATID}>current_page_item</IF>"
... but {THISCATID} doesnt seem to work in toplists.
Tested and {THISCATID} works for me in toplists. It's probably {CATID} that's not behaving as you expect it, it could always be the same as {THISCATID}, you'll want to use {LINKCATID} instead.
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 Current Page CSS class
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Posted Jan 17, 2013 - 1:25 PM:
I've created a category menu using a toplist.... I want a different CSS class if in the menu for the current viewed catgory so that the button can be a different colour. I tried...
class="menu-item <IF {THISCATID} is {CATID}>current_page_item</IF>"
... but {THISCATID} doesnt seem to work in toplists.
How can this be done?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I think the only way will be to make {THISCATID} work there, I'll look into it.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Tested and {THISCATID} works for me in toplists. It's probably {CATID} that's not behaving as you expect it, it could always be the same as {THISCATID}, you'll want to use {LINKCATID} instead.