Page 1 of 1

CGBlog: hide category from browsecat

Posted: Tue Oct 09, 2012 9:27 am
by henris17
Hello

In CGBlog, I would like to hide (or exclude) a specific category from "action=browsecat," Is there a simple way of doing this ?

Thanks
Henri

Re: CGBlog: hide category from browsecat

Posted: Wed Oct 17, 2012 9:24 am
by henris17
Anyone could help me on that ?
:)

Re: CGBlog: hide category from browsecat

Posted: Wed Oct 17, 2012 5:05 pm
by Dr.CSS
Have you tried category=one,two,three there is an exclude category parameter but it doesn't work with action=browscat, I sponsored the notcategory="" maybe you can sponsor it being changed to work with action=browscat...

Re: CGBlog: hide category from browsecat

Posted: Fri Apr 19, 2013 4:33 pm
by CAC
I know this is an old thread but I stumbled across it and I guess someone else might do the same.

To hide a category just alter the 'Browse Category' template:

Code: Select all

<ul>
{foreach from=$categories item='one'}
  <li class="{$one.name}"><a href="{$one.url}" title="{$one.name}">{$one.name}</a>&nbsp;({$one.count})</li>
{/foreach}
</ul>
As you can see above, I have given the list element a class of {$one.name}

Therefore, each bullet will classed as whatever the category name is. Then just use CSS...

Code: Select all


.categoryname {

display: none;

}
Easy :)

Re: CGBlog: hide category from browsecat

Posted: Fri Apr 19, 2013 4:36 pm
by calguy1000
<ul>
{foreach from=$categories item='one'}
{if $one.name != 'foo'}
<li class="{$one.name}"><a href="{$one.url}" title="{$one.name}">{$one.name}</a>&nbsp;({$one.count})</li>
{/if}
{/foreach}
</ul>