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.
Code: Select all
{foreach from=$categories item=c}
<div>
<div><img name="{$c.category}_" src="{$ImagesDir}/custom/paw.gif"></div>
<div><a href="home.php?cat={$c.categoryid}">{$c.category}</a></div>
</div>
{/foreach}
Code: Select all
name="{$c.category}_"Code: Select all
name="{str_replace(" ","_",$c.category)}_"My question is.. How can I make PHP functions work in X-Cart/Smarty?Error: Smarty error: [in customer/categories.tpl line 26]: syntax error: unrecognized tag: str_replace(" ","_",$c.category) (Smarty_Compiler.class.php, line 436) in C:\apache2triad\htdocs\clients\sitename.com\www\Smarty-2.6.12\Smarty.class.php on line 1095
I cant even find where $c.category is set. Thanks much.