You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When overriding a block with sub block in a parent two templates up, and a template in between only overrides the sub blocks, the code in the sub blocks in the parent template seems to override the blocks in the highest template. This and can generate a fatal error as shown in the following example. I am aware that this is quite an obscure example, and not 100% sure if this is working as intended or not.
edits: some typos and better wording of the behavior I'm seeing
parent block1.1
parent block1.2
( ! ) Fatal error: Call to a member function test() on a non-object in <hash>.file.test_smarty_parent.tpl.php on line 59
...
The text was updated successfully, but these errors were encountered:
xelsas
changed the title
Code that is not displayed is still executed
Code in blocks that are not displayed is still executed
Nov 17, 2016
xelsas
changed the title
Code in blocks that are not displayed is still executed
Template inheritance has strange block override priority?
Nov 17, 2016
When overriding a block with sub block in a parent two templates up, and a template in between only overrides the sub blocks, the code in the sub blocks in the parent template seems to override the blocks in the highest template. This and can generate a fatal error as shown in the following example. I am aware that this is quite an obscure example, and not 100% sure if this is working as intended or not.
edits: some typos and better wording of the behavior I'm seeing
PHP code:
test_smarty.tpl
test_smarty_parent.tpl
test_smarty_parent_2.tpl
This generates the following output:
The text was updated successfully, but these errors were encountered: