|
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 |
inspired Smarty n00b
Joined: 20 Jul 2010 Posts: 3
|
Posted: Thu Feb 04, 2016 5:44 pm Post subject: Capture not work in PHP 7.0.2 |
|
|
Hi!
I have problem with capture block in PHP 7.0.2. (work in 5.6.17)
In this file including call_request.tpl that has only 2 capture blocks
Code: | {extends file='frontend/include/parent.tpl'}
{block name='layout_content'}
{include file='frontend/Feedback/call_request.tpl'}
{$call_request_tpl_body}
{/block}
{block name='js-bottom-block'}
{$call_request_tpl_js}
{/block}
|
$_smarty_tpl->_cache['__smarty_capture'] is empty after calling file that have 2 capture blocks. I use `name` and `assign`, but nothing shown.
But when I try to get OB in fuction of capture block php file in teplates_c folder $_smarty_tpl->_cache['__smarty_capture'] is filling (use var_dump for check).
Code: | $_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:frontend/Feedback/call_request.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
echo (isset($_smarty_tpl->_cache['__smarty_capture']['call_request_tpl_body']) ? $_smarty_tpl->_cache['__smarty_capture']['call_request_tpl_body'] : null);?>
|
Inside render method $_smarty_tpl->_cache['__smarty_capture'] is fill, but after $_smarty_tpl->_cache is empty, data lost. |
|
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
|