Retrieve custom assigned template variable in a UDT [SOLVED]
Posted: Sat Jun 19, 2010 6:51 pm
Hi,
I want to share a little problem that I faced today while writing a UDT that would perform a str_replace.
This is my cms template :
and this is the UDT mycustomudt :
Now, when I look at my page in a browser, nothing shows up.
I suspect that for some reason the UDT doesn't retrieve $mycustomvariable...
What am I doing wrong?
Thanks
I want to share a little problem that I faced today while writing a UDT that would perform a str_replace.
This is my cms template :
Code: Select all
...
{capture assign=mycustomvariable}{content block="Fruits" wysiwyg="false"}{/capture}
{mycustomudt}
...
Code: Select all
global $gCms;
$healthy = array("apple", "orange", "pear");
$yummy = array("pizza", "beer", "ice cream");
$yummyoutput = str_replace($healthy, $yummy, $mycustomvariable);
echo $yummyoutput ;
I suspect that for some reason the UDT doesn't retrieve $mycustomvariable...
What am I doing wrong?
Thanks
