CGBlog: Hide categories from browscat

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
cpansewicz
Forum Members
Forum Members
Posts: 142
Joined: Fri Jun 17, 2011 12:22 am

CGBlog: Hide categories from browscat

Post by cpansewicz »

I would like to be able to exclude a category from the browsecategory template. Below is the code from this post: http://forum.cmsmadesimple.org/viewtopi ... =7&t=63400

The code works great, but I can't figure out how to include the child categories in this code.

<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>
cpansewicz
Forum Members
Forum Members
Posts: 142
Joined: Fri Jun 17, 2011 12:22 am

SOLVED: CGBlog: Hide categories from browscat

Post by cpansewicz »

I did figure this out on my own. I just used the sample browse category template provided, and added to the line {if $rec >0}

AND $cid=1 (the category I wanted to show)
Post Reply

Return to “Modules/Add-Ons”