Guest Posted August 6, 2005 Share Posted August 6, 2005 As highlighted in the pic, can anyone guide me on how to place / have more sub category placed on each row rather than just having 3? Prob: I'm using the killer skin, and once in that category, having only 3 sub cat in a row looks real weird off... Quote Link to comment Share on other sites More sharing options...
Guest Posted August 6, 2005 Share Posted August 6, 2005 I have been searching the forum for a solution to the same problem. No Luck as of yet. Back to the search! Quote Link to comment Share on other sites More sharing options...
Guest taherhs Posted August 6, 2005 Share Posted August 6, 2005 Hi, I made it 3 per row. You may want more or less. Try this in viewCat.tpl (in killer/styleTemplate/content) <div id="subCats"><center> <table border="0" width="100%" cellspacing="0" cellpadding="10" align="center"> <tr align="center"><td align="center"> <!-- BEGIN: sub_cats_loop --> <span class="subCat"><center> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" border="0" alt="{TXT_CATEGORY}" /></a><br /> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS}) <!-- BEGIN: nextrow --> </td></tr><tr align="center"><td align="center"> <!-- END: nextrow --> </center> </span> </div> and this in viewCat.inc.php (include/content) $j=0; for ($i=0; $i<count($subCategoroies); $i++){ if(empty($subCategoroies[$i]['cat_image'])){ $view_cat->assign("IMG_CATEGORY",$GLOBALS['rootRel']."skins/".$config['skinDir']."/styleImages/catnophoto.gif"); } else { $view_cat->assign("IMG_CATEGORY",$GLOBALS['rootRel']."images/uploads/".$subCategoroies[$i]['cat_image']); } $view_cat->assign("TXT_LINK_CATID",$subCategoroies[$i]['cat_id']); $view_cat->assign("TXT_CATEGORY", $subCategoroies[$i]['cat_name']); $view_cat->assign("NO_PRODUCTS", $subCategoroies[$i]['noProducts']); $j++; if ($j == 3){ $j = 0; $view_cat->parse("view_cat.sub_cats.sub_cats_loop.nextrow"); } $view_cat->parse("view_cat.sub_cats.sub_cats_loop"); } // end loop results Quote Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2005 Share Posted August 12, 2005 YOu add those in or replace certain phrase... Newbie here, hope you can enlighten me Quote Link to comment Share on other sites More sharing options...
kinetic Posted August 12, 2005 Share Posted August 12, 2005 no need to mod any of the files except the layout.css for the skin you are using look for the .subCat class and adjuts the width and heights in there also in admin settings you can adjust how many to display... Quote Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2005 Share Posted August 13, 2005 Thanks dude, have you tried the new version 3.02, it seems to have fixed the small little buggy... Thanks anyway... Good day Quote Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2005 Share Posted August 13, 2005 Thanks Kinetic....works like a charm. 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.