smarty - Template inheritance: remove block that was added in grandparent and appended to in parent -


in smarty template, have 3 templates:

base.tpl

{block name="myblock"}     base {/block} 

child.tpl

{extends file="base.tpl"} {block name="myblock" append}     child {/block} 

grandchild.tpl

{extends file="child.tpl"} {block name="myblock"}{/block} 

when rendering grandchild.tpl, output is

base 

so grandchild-template wants replace content of whole block, replaces appended part. how delete whole block?

related: how remove content appended block in parent template?

the solution here in child.tpl change block definition from:

{block name="myblock" append}     child {/block} 

into:

{block name="myblock"}     {$smarty.block.parent} child {/block} 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -