Skipping groups in category listing

Post Reply
Psytonic
Posts: 15
Joined: Tue Jul 09, 2013 11:30 am

Skipping groups in category listing

Post by Psytonic »

I'm trying to exclude/skip certain groups from displaying on my multicategory main page but those unwanted groups keep showing. I've tried the following:

<category order=clicks ... skip_group_id=...>
<category order=clicks ... skip_group=...>
<category order=clicks ... skip_group_name=...>

None of those work for me. I have the latest update 50. I've seen those same skip_group... tags used in the latest updates for <thumb ...> tags but have not seen those same skip options mentioned for the category tags. I thought there must be ways for the category tags to skip certain groups. I really need to know if and how I can make it happen?

Thanks
admin
Site Admin
Posts: 37241
Joined: Wed Sep 10, 2008 11:43 am

Re: Skipping groups in category listing

Post by admin »

There's no such tag

Example

<category order=clicks...

<?php if ('<!--CATEGORY_ID-->' != '123') {?>
your template
<?php } ?>
Don't forget to run script update
Psytonic
Posts: 15
Joined: Tue Jul 09, 2013 11:30 am

Re: Skipping groups in category listing

Post by Psytonic »

Hmmm so if the <category> tags can't do it, could I try and use the <thumb> tags to display the category thumbs on an index page... using the skip options linked to <thumb skip_group...? I'm just not sure if the thumb tags and category tags are able to work in the same way. That would only help with listing the relevant category thumbs but not a full text category tree.

So there is no other way to exclude group/s from showing in the category listings? I've been trying to come up with workarounds, but no luck so far. I'm not sure if I understand your example in your last post correctly.
Last edited by Psytonic on Tue Jul 09, 2013 12:01 pm, edited 1 time in total.
admin
Site Admin
Posts: 37241
Joined: Wed Sep 10, 2008 11:43 am

Re: Skipping groups in category listing

Post by admin »

Do you see an example of exclusion above this message ?
Don't forget to run script update
Psytonic
Posts: 15
Joined: Tue Jul 09, 2013 11:30 am

Re: Skipping groups in category listing

Post by Psytonic »

So would I put this:

<?php if ('<!--CATEGORY_ID-->' != '123') {?>
your template
<?php } ?>

Above my <category order=clicks... sections in my template? I have multiple categories i'd like to exclude so would I put '123,456,789'?

For the "your template" part I'd like to show nothing at all, as if they don't exist, so i'm guessing leave that blank then?
admin
Site Admin
Posts: 37241
Joined: Wed Sep 10, 2008 11:43 am

Re: Skipping groups in category listing

Post by admin »

ok


<category order=clicks num=1-100>

<?php if ('<!--CATEGORY_ID-->' != '123') {?>
your template
<?php } ?>

</category>


where 123 is the category you want to skip
Don't forget to run script update
Psytonic
Posts: 15
Joined: Tue Jul 09, 2013 11:30 am

Re: Skipping groups in category listing

Post by Psytonic »

Ok so i've been trying to use your example with no luck. I've been trying to write the code in a if else type statement.

<?php if ('<!--CATEGORY_ID-->' != '123') {?>
blank;
else {<div class="cat"><img class="cat" src="http://www.domain.com/design/tag1.png"><a class="three" href="/category/<!--CATEGORY_ID-->/<!--CATEGORY_NAME-->/ctr/1/"><!--CATEGORY_NAME--></a></div>;}
<?php } ?>

But I don't think the syntax is correct. I'd like to exclude about 3 categories so i'm thinking I need to do something like...
if (cat=*)
{template;}
else if (cat=*)
{template;}
else if (cat=*)
{template;}
else
{<div class="cat"><img class="cat" src="http://www.domain.com/design/tag1.png"><a class="three" href="/category/<!--CATEGORY_ID-->/<!--CATEGORY_NAME-->/ctr/1/"><!--CATEGORY_NAME--></a></div>}

Is that the right way to do it? I want it to show the normal category html unless those specific categories are shown.
admin
Site Admin
Posts: 37241
Joined: Wed Sep 10, 2008 11:43 am

Re: Skipping groups in category listing

Post by admin »

Just copy my example
no need to modify it


<category order=clicks num=1-100>

<?php if ('<!--CATEGORY_ID-->' != '123') {?>

<div class="cat"><img class="cat" src="http://www.domain.com/design/tag1.png"><a class="three" href="/category/<!--CATEGORY_ID-->/<!--CATEGORY_NAME-->/ctr/1/"><!--CATEGORY_NAME--></a></div>

<?php } ?>

</category>




That's it.
just copy
Don't forget to run script update
Post Reply