Guest mmjosh1010 Posted July 10, 2007 Share Posted July 10, 2007 Sorry I know not a lot of you won't be interested in this but just wondering if anyone could tell me how to do something. I have changed the way Sub-Category's are viewed (just an experiment) but if you look on: http://www.software247.co.uk/new/index.php...Cat&catId=3 I want just 1 category to appear on each line but at the moment about 2 can fit, how can I make it so there is just one category on each line? Thanks Quote Link to comment Share on other sites More sharing options...
Guest Brivtech Posted July 10, 2007 Share Posted July 10, 2007 You'll need to play around in your template file: Open skins/Carreta-Soft/styleTemplates/contents/viewCat.tpl This chunk of code determines how your categories are displayed: <!-- BEGIN: sub_cats --> <div id="SubCategories"> <!-- BEGIN: sub_cats_loop --> <div class="subCat"><a href="index.php?_a=viewCat&catId={TXT_LINK_CATID}" title="{TXT_CATEGORY}"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" /></a><br /> <a href="index.php?_a=viewCat&catId={TXT_LINK_CATID}" title="{TXT_CATEGORY}">{TXT_CATEGORY}</a> ({NO_PRODUCTS})</div> <!-- END: sub_cats_loop --> </div> <br clear="all" /> <!-- END: sub_cats --> If you replace it with: <!-- BEGIN: sub_cats --> <div id="SubCategories"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <!-- BEGIN: sub_cats_loop --> <tr> <td> <div class="subCat"><a href="index.php?_a=viewCat&catId={TXT_LINK_CATID}" title="{TXT_CATEGORY}"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" /></a><br /> <a href="index.php?_a=viewCat&catId={TXT_LINK_CATID}" title="{TXT_CATEGORY}">{TXT_CATEGORY}</a> ({NO_PRODUCTS})</div> </td> </tr> <!-- END: sub_cats_loop --> </table></div> <br clear="all" /> <!-- END: sub_cats --> ... then you'll be able to achieve what you're after. The table forces a new row for each category that's being displayed in a sub-category view. Note that the table declarations are before and after the main loop. The rows are assigned within the loop, so you get a new row for each new product being displayed. CSS Purists - Eat your hearts out! Please let me know if it does the trick for you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.