i just bought the excellent "cmsms cookbook" from S.Goldstein. (m'm a beginner in smarty/php scripting). I found and interesting script in this book to replace a string by another.
It works very well on the page content, but i need to replace strings just in the menu.
How can this be done? Is there a function to affect the menu part?
Code: Select all
<?php
function smarty_cms_postfilter_trademark($tpl_output,&$smarty)
{
$result = explode(':', $smarty->_current_file);
if (count($result) > 0)
{
if ($result[0] == 'content')
{
$tpl_output = str_replace('myText','myText<sup>TM</sup>', $tpl_output);
}
}
return $tpl_output;
}
?>