CGBlog: hide category from browsecat

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
henris17
Forum Members
Forum Members
Posts: 70
Joined: Sun Feb 06, 2011 11:11 pm

CGBlog: hide category from browsecat

Post 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
henris17
Forum Members
Forum Members
Posts: 70
Joined: Sun Feb 06, 2011 11:11 pm

Re: CGBlog: hide category from browsecat

Post by henris17 »

Anyone could help me on that ?
:)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CGBlog: hide category from browsecat

Post 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...
CAC
Forum Members
Forum Members
Posts: 14
Joined: Wed Mar 17, 2010 7:53 pm

Re: CGBlog: hide category from browsecat

Post 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 :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGBlog: hide category from browsecat

Post 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>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Modules/Add-Ons”