View Single Post
  #12  
Old 02-21-2004, 03:54 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default

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}
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote