hi Steve!
I'm trying to implement this code with your script. This would keep the current subcategory listed.
It's not my code, I got it from someone on this forum. Sorry I dont remember the original thread.
HTH.
Thanks for your kind reply.
Code:
{section name=cat_num loop=$categories}
{* Added by Fernando. Show first level of subcategories *}
{if $current_category ne "" }
{section name=subcat loop=$allcategories}
{assign var=topmostcat value=$allcategories[subcat].categoryid_path|regex_replace:"/\/.*/":""}
{assign var=current_category_top value=$current_category.categoryid_path|regex_replace:"/\/.*/":""}
{if $current_category_top eq $topmostcat and $categories[cat_num].categoryid eq $topmostcat and $allcategories[subcat].parentid eq $topmostcat and $allcategories[subcat].categoryid ne $current_category_top}
{$allcategories[subcat].category|truncate:20:"...":true}
{/if}
{/section}
{/if}
{* End added by Fernando *}
{/section}