subcategories list displayed in two columns

I would like to have the list of my subcategories to appear in two columns instead of one “very long” single column…is it possible? and what code should I modify to get that result?

Please check the attached capture that explains better what I am trying to accomplish…

cs-forum-question-image.jpg

HI Here is my solution for better view.



The file in /skins/basic/customer/views/categories/view.php


```php



{if $category_data.main_pair}



{include file=“common_templates/image.tpl” show_detailed_link=true images=$category_data.main_pair object_type=“detailed_category” no_ids=true rel=“category_image” show_thumbnail=“Y” image_width=$settings.Thumbnails.category_details_thumbnail_width image_height=$settings.Thumbnails.category_details_thumbnail_height hide_if_no_image=true}





{if $category_data.main_pair.detailed_id}

{include file=“common_templates/previewer.tpl” rel=“category_image”}

{/if}



{/if}



{if $subcategories}





{if $subcategories|@count < 3}



{/if}



{/if}


{/if} ```

Edit the css .subcategories if you like

I must be missing something. The default number of columns for sub-categories is already 2 and can be set in the Appearance Settings (or one of the admin areas anyway). You shouldn't need any customization.



However, if your sub-category names are too long to fit in 2 columns, you will see an empty line and then the 2nd column below it. It uses a “float-left” so it will be 2 columns if it fits but if not, it will be one.

[quote name='tbirnseth' timestamp='1318356429' post='123452']

I must be missing something. The default number of columns for sub-categories is already 2 and can be set in the Appearance Settings (or one of the admin areas anyway). You shouldn't need any customization.



However, if your sub-category names are too long to fit in 2 columns, you will see an empty line and then the 2nd column below it. It uses a “float-left” so it will be 2 columns if it fits but if not, it will be one.

[/quote]

Thank you for your replies…I would rather not make changes to the code unless really necessary…but if it does not work I will make the changes

thank you for sharing the code



Tbirnseth I know what you are referring to in the admin settings

however is there a way so that if the name does not fit it will use a second line to complete that name listing and then show the next name on a new line? I mean is there a way to avoid what currently happens?