splitting subcategories

I’m trying to split the topics subcategories like the catalog, having the subcategories topics in columns. This is the code I messed up myself… any idea?


```php {* $Id: topics.tpl 317 2005-06-21 21:14:34Z vladimir $ *}



{split data=$subtopics size=$columns|default:“2” assign=“splitted_subtopics”}



{math equation=“floor(100/x)” x=$columns|default:“2” assign=“cell_width”}







{capture name=“mainbox”}







{if $topic_data.description}


{$topic_data.description}


{elseif !($subtopics || $pages)}

{$lang.error_no_pages}

{/if}



{if $subtopics}


{foreach from=$splitted_subtopics item=cat}

{foreach from=$subtopics item=cat}


{/foreach}


{/foreach}


· {$cat.topic}




{/if}



{if $pages}





{include file="pages_pages/pages.tpl" title=""}

{/if}



{/capture}

{include file="common_templates/mainbox.tpl" title=$topic_data.topic content=$smarty.capture.mainbox}

```

nobody? :slight_smile:

i think the idea of splitting the sub categories is great, but id mess the code up too if i tried. LOL, sorry im no help

Try this



[url]http://vb.cs-cart.com/showthread.php?t=262&highlight=categories[/url]