I am adding a rollover image next to the category names in the main navigation. The following is my stripped down for this post version.
[php]
{foreach from=$categorie s item=c}
<div>
<div><img name="{$c.categ ory}_" src="{$ImagesDi r}/custom/paw.gif"></div>
<div><a href="home.php? cat={$c.categor yid}">{$c.categ ory}</a></div>
</div>
{/foreach}
[/php]I need to remove spaces in the names given at
Expand|Select|Wrap|Line Numbers
- name="{$c.category}_"
Expand|Select|Wrap|Line Numbers
- name="{str_replace(" ","_",$c.category)}_"
Error: Smarty error: [in customer/categories.tpl line 26]: syntax error: unrecognized tag: str_replace(" ","_",$c.catego ry) (Smarty_Compile r.class.php, line 436) in C:\apache2triad \htdocs\clients \sitename.com\w ww\Smarty-2.6.12\Smarty.c lass.php on line 1095My question is.. How can I make PHP functions work in X-Cart/Smarty?
I cant even find where $c.category is set. Thanks much.