Reputation: 5840
In a smarty template, I have three 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
, the output is
base
So the grandchild-template wants to replace the content of whole block, but only replaces the appended part. How do I delete the whole block?
Related: How to remove content appended to block in parent template?
Upvotes: 0
Views: 882
Reputation: 111829
The solution here is in child.tpl
change block definition from:
{block name="myBlock" append}
child
{/block}
into:
{block name="myBlock"}
{$smarty.block.parent} child
{/block}
Upvotes: 1