nrueckmann / smarty-php

Automatically exported from code.google.com/p/smarty-php
0 stars 0 forks source link

variable template file names not allow within {block} tags #161

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
"variable template file names not allow within {block} tags"
Well, it worked flawlessly for us for a year.
And now, in a *minor* version, it is suddenly disabled without a deprecation 
warning, option to re-enable it or whatever.

Versions: 3.1.15, trunk@4786

Original issue reported on code.google.com by Erro...@gmail.com on 10 Oct 2013 at 3:02

GoogleCodeExporter commented 8 years ago
Included templates could also contain {block} tags. As inheritance is currently 
a compile time process it could not work with variable file names and did 
create wrong results. 

If your included templates don't contain {block} as workaround until a better 
solution has been found you can comment out lines 138 to 140 in file 
smarty_internal_compile_include.php

Original comment by Uwe.Tews@googlemail.com on 10 Oct 2013 at 11:55

GoogleCodeExporter commented 8 years ago
The fix is now in the SVN trunk and will later included in 3.1.16

Original comment by Uwe.Tews@googlemail.com on 13 Oct 2013 at 12:50

GoogleCodeExporter commented 8 years ago
The change for this is done now.

Original comment by Uwe.Tews@googlemail.com on 13 Oct 2013 at 12:51

GoogleCodeExporter commented 8 years ago
Thank you

Original comment by Erro...@gmail.com on 14 Oct 2013 at 2:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Smarty 3.1.21

layout.tpl:

...
{block name=body}{/block}
...

index.tpl:
{extends file='./layout.tpl'}
{assign 'myPath' "../locales/ru/mainBodyText.tpl"}

{block name=body}
  {include file=$myPath}
{/block}

=======

Again this annoying error:

"variable template file names not allow within {block} tags"

Original comment by dzen...@gmail.com on 11 Mar 2015 at 6:38