|
This code will change the order in which categories are displayed in the top bar. The default order is like this: Directory » Category » Sub-Category This mod will make the path display as: Sub-Category « Category « Directory
Open topbar.tpl and find this code: {* Display current path *} {assign var="current_path" value=""} {foreach from=$path item=cat name=path} {assign var="current_path" value="`$current_path``$cat.TITLE_URL`/"} {if !$smarty.foreach.path.first} » {/if} {if !$smarty.foreach.path.last} <a href="/{if smarty.const.ENABLE_REWRITE}{$current_path}{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape|trim}</a> {else} {$cat.TITLE|escape|trim} {/if} {/foreach}
Replace it with this code: {* Display current path in reverse *} {assign var="current_path" value=""} {section name=foo loop=$path step=-1} {assign var="current_path" value="`$current_path``$path[foo].TITLE_URL`/"} {if !$smarty.section.foo.first} « <a href="/{if $smarty.const.ENABLE_REWRITE}{$current_path}{else}index.php?c={$path[foo].ID}{/if}">{$path[foo].TITLE|escape|trim}</a> {else} {$path[foo].TITLE|escape|trim} {/if} {/section}
|