A about template hierarchy problems.

22 views
Skip to first unread message

Bios Sun

unread,
Aug 8, 2012, 9:31:26 AM8/8/12
to smarty-d...@googlegroups.com
I have the following these templates:

index.html
--------------------------------------------------------------------------------------------------------------
<{include file="a-1.html"}>
<{include file="a-2.html"}>

a-0.html
-------------------------------------------------------------------------------------------------------------- 
<{block name="a"}>a-0<{/block}> <br />

a-1.html
--------------------------------------------------------------------------------------------------------------
<{extends "a-0.html"}>
<{block name="a"}>
a-1 : <{include file="b-1.html"}>
<{/block}>

a-2.html
--------------------------------------------------------------------------------------------------------------
<{extends "a-0.html"}>
<{block name="a"}>
a-2 : <{include file="b-1.html"}>
<{/block}>

b-0.html
-------------------------------------------------------------------------------------------------------------- 
b: <{block name="b"}>b-0<{/block}>

b-1.html
-------------------------------------------------------------------------------------------------------------- 
<{extends "file:page/b-0.html"}>
<{block name="a"}>b-1<{/block}>


Input content as follows:
--------------------------------------------------------------------------------------------------------------  
a-1 : b-1 
a-2 : b-0

This is why?

(Sorry, my English is not so good. But I think there template can explain to my problem, please help me.)

uwe.tews

unread,
Aug 15, 2012, 11:11:10 AM8/15/12
to smarty-d...@googlegroups.com
Template inheritance did produce wrong code if subtemplates with {block} tags was  included several times.
 
This bug is now fixed in the SVN and will later be included in 3.1.12
Reply all
Reply to author
Forward
0 new messages