|
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 |
ananthbtechit Smarty n00b
Joined: 25 Mar 2016 Posts: 3
|
Posted: Wed Oct 05, 2016 9:32 am Post subject: Query on use of {extends} with parent, child and grandchild |
|
|
In the Smarty 3.1 README file, please add more clarity with an example for the following explanation:
---------
Instead of defining the parent/child relationships with the {extends} tag in the child template you
can use the resource as follow:
$smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl');
Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content
is appended or prepended to the child block content.
-------------
It is not clear, when the "'extends:parent.tpl|child.tpl|grandchild.tpl" will use which template for rendering: parent.tpl, or child.tpl or grandchild.tpl?
It would be great if you could illustrate with an example.
Thanks in advance. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Oct 05, 2016 9:37 am Post subject: |
|
|
It will use normal inheritance order. As named. |
|
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
|