Quote:
Originally Posted by amgdg
To select the current category, change your option statement to:
<option class=CategoriesList value="{$categories[cat_num].categoryid}" {if $current_category eq $categories[cat_num]}selected{/if}>{$categories[cat_num].category_name|escape}</option>
-> Al
|
Strangely this code perfectly on my local pc but when I upload to server
It doesn't select the "curent category" !!! what could be the wrong ?
here is my code
Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $config.General.root_categories eq "Y"}
<form name="form_cat" method="get" action="home.php">
<select name="cat" onChange="document.form_cat.submit()">
<option value="0">Select...</option>
{section name=cat_num loop=$categories}
<option class=CategoriesList value="{$categories[cat_num].categoryid}" {if $current_category eq $categories[cat_num]}selected{/if}>{$categories[cat_num].category_name|escape}</option>
{/section}
</select>
</form>
{else}
{section name=cat_num loop=$subcategories}
<font class=CategoriesList>
{ $subcategories[cat_num].category_name|escape }</font>
{/section}
{/if}
{/if}
{/capture}
{include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu}