View Full Version : change comma between subcategs display on home page
shutzu
05-22-2006, 06:14 PM
anyone knows how can I change the comma between subcategs display in main page?
now it looks like that:
BIG CATEGORY
subcat1, subcat2, subcat3, ...
i would like to change the comma between subcat1 and subcat2 into " | ", can this be done?
neurosis4u
05-22-2006, 06:39 PM
look in your main.tpl and change following
{* Display subcategories *}
{if !empty($cat.SUBCATS)}
<p class="subcats">
{foreach from=$cat.SUBCATS item=scat name=scategs}
<a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escap e}/{$scat.TITLE_URL|escape}/{else}index.php?c={$scat.ID}{/if}" class="cats">
{$scat.TITLE|escape}</a>, {/foreach} ...
</p>
{/if}
change it into:
{* Display subcategories *}
{if !empty($cat.SUBCATS)}
<p class="subcats">
{foreach from=$cat.SUBCATS item=scat name=scategs}
<a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escap e}/{$scat.TITLE_URL|escape}/{else}index.php?c={$scat.ID}{/if}" class="cats">
{$scat.TITLE|escape}</a>| {/foreach} ...
</p>
{/if}
look at the line: {$scat.TITLE|escape}</a>, {/foreach} ...its only changed to {$scat.TITLE|escape}</a>| {/foreach} ...
shutzu
05-22-2006, 06:43 PM
cool, thanks, works great..
one more little problem.. how do I increase the font a bit? :) in main.css? wich of the options?
shutzu
05-22-2006, 06:54 PM
i did this too, thanks anyway
i only have two categs, and set to show categs on tow columns, but they are displayed only on one column. can I change that?
mmariusel
05-22-2006, 09:47 PM
I think that you have modified the code... you are building your one template? You should keep the table as it is. Otherwise you will have the same problem.
Make the table as you wanna see it in the main and then copy your original code in to it. I think it will work. Do not change the original code if don`t know what are ya doing.
Then go in your main.css , and modify the code as you wish but keep the name of the classes.
shutzu
05-22-2006, 10:07 PM
well, if i add a third categ, they`ll be posted on two collumns
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.