|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
zardrell Smarty Rookie
Joined: 28 Oct 2011 Posts: 7 Location: TOKYO / JAPAN
|
Posted: Thu Jul 25, 2013 3:08 pm Post subject: Smarty 3.1.14: nested block problem |
|
|
Hi.
I've got some problems when using nested block.
a.tpl
Code: |
{block name='body'}
{block name='main'}{/block}
{/block}
|
b.tpl extends a.tpl
Code: |
{block name='body'}
{block name='main'}
{$smarty.block.child}
{block name='menu'}{/block}
{/block}
{/block}
|
and I got the following error:
Quote: |
Syntax Error in template "b.tpl" on line xx "{/block}" unexpected closing tag.
|
then I edited b.tpl
Code: |
{block name='body'}
{block name='main'}
{block name='menu'}
menu
{/block}
{$smarty.block.child}
{/block}
{/block}
|
c.tpl extends b.tpl
Code: |
{block main}
From c.tpl
{/block}
|
what I expected:
but instead the output is:
If I change b.tpl to:
Code: |
{block name='body'}
{block name='main'}
{$smarty.block.child}
{block name='menu'}
menu
{/block}
{/block}
{/block}
|
I will get
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Jul 26, 2013 1:51 pm Post subject: |
|
|
The fix is now in the SVN trunk and will later be included in 3.1.15 |
|
Back to top |
|
Lenchik Smarty n00b
Joined: 13 Nov 2010 Posts: 4
|
Posted: Fri Aug 02, 2013 4:35 pm Post subject: |
|
|
Seems that this fix brokes some big sized (no particular "border" size found so far) named child blocks. If it helps: parent template was extended through php's Code: | $smarty->display('extends:parent.tpl|'.$child_template_sourcepath); | Worked OK with r4757 version of smarty_internal_compile_block.php |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Aug 02, 2013 7:10 pm Post subject: |
|
|
What type of failure do you geht? Which error message? |
|
Back to top |
|
Lenchik Smarty n00b
Joined: 13 Nov 2010 Posts: 4
|
Posted: Fri Aug 02, 2013 7:44 pm Post subject: |
|
|
No error message. Just contents not "imported" from child block fully. Only hundred symbols or so. It "imports" reduced version completely, if i half reduce contents of child block for finding reason. But no "bordering" number (like 32000 symbols). No such problem until this fix applied. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Aug 02, 2013 8:53 pm Post subject: |
|
|
Please see my private message for sending example templates. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Aug 24, 2013 6:55 pm Post subject: |
|
|
The fix is now in the SVN trunk and will later be included in 3.1.15 |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|