Jump to content

List Categories in columns


Recommended Posts

Is it possible with this code, to list the categories into more columns than 1?

Like: foreach 5 <li> create a new <ul> ?

 

So it looks like this:

1bla 6bla 11bla

2bla 7bla 12bla

3bla 8bla 13bla

4bla 9bla 14bla

5bla 10bla 15bla

 

{if isset($subcategories)}
 <!-- Subcategories -->
 <div id="subcategories">
  <ul class="inline_list">
  {foreach from=$subcategories item=subcategory}
<li>
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
</li>
  {/foreach}
  </ul>
  <br class="clear"/>
 </div>
 {/if}

 

 

I hope someone knows the trick :-)

Link to comment
Share on other sites

Thanks for the reply, but i have already done that, and i "works".

But the problem is that it sorts categories alphabetically vertical, instead of alphabetically horizontally.

 

So therefore i want to list the categories in <li> with 100% width and then after like 5 <li> it should make a new <ul> with 5 <li>

 

I Really hope it is possible :-)

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...