Page 1 of 1

cgsimplesmarty in UDT

Posted: Tue Mar 19, 2013 6:34 pm
by Bekker
Hi, im trying to use CG Smarty in a UDT, but with even the most simple things i get syntax error?

I tried using a example from the help page from cg simple smarty:

Code: Select all

{cgsimple::get_children('',0,'children')}
{if count(\$children)}
   {foreach from=\$children item='child'}
      {if \$child.show_in_menu}
        Child:  id = {\$child.id} alias = {\$child.alias}<br/>
      {/if}
   {/foreach}
{/if}
But i get:

Code: Select all

Invalid code entered.
Parse error: syntax error, unexpected '}' in /hsphere/local/home/clublust/*******.dk/_work/julefest/admin/adduserplugin.php(100) : eval()'d code on line 1

Re: cgsimplesmarty in UDT

Posted: Tue Mar 19, 2013 9:03 pm
by velden
As far as I know UDT expects php code, not smarty.

Re: cgsimplesmarty in UDT

Posted: Tue Mar 19, 2013 9:29 pm
by Rolf

Re: cgsimplesmarty in UDT

Posted: Tue Mar 19, 2013 10:00 pm
by Bekker
Ahhhh i see...
I was just sure i could make smart in there aswell :)
Thanks!