Page 1 of 1

[SOLVED] tag within tag

Posted: Thu Nov 10, 2011 12:10 pm
by sumpson
Hello I would like to add the folowing to my template:

{global_content name='{content block="block1" oneline="true"}'}

I get the error: string(59) "Smarty error: unable to read resource: "globalcontent:{php"" '}

There should be a simple solution but I cant seem to find it, hope someone will help. Thanks.

Re: tag within tag

Posted: Thu Nov 10, 2011 12:34 pm
by Jos

Code: Select all

{content block='block1' oneline='true' assign='block1'}
{global_content name=$block1}

Re: tag within tag

Posted: Thu Nov 10, 2011 12:42 pm
by sumpson
Bedankt (thanks) Jos!

got this now:

Code: Select all

{content block='block1' oneline='true' assign='block1'}
{if !empty($block1)}{global_content name=$block1}{/if}
otherwise I get the error:

Code: Select all

String(55) "Smarty error: unable to read resource: "globalcontent:""
when it's empty