Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

block appending and prepending in 3.1rc1

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
thm
Smarty Rookie


Joined: 09 Nov 2009
Posts: 8

PostPosted: Tue Jul 19, 2011 5:41 pm    Post subject: block appending and prepending in 3.1rc1 Reply with quote

Hi,

I used to have code like this:

{block name='foo' prepend=true}
...
{/block}

with the foo block being defined elsewhere and inherited via {extends..}. This works in 3.08. In 3.1rc1 however, it is a syntax error. Changing to

{block name='foo' prepend='true'}

compiles, but now it doesn't work anymore: The foo block retains the inherited contents, and the contents that should be prepended are lost.

What is the correct syntax?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Jul 19, 2011 6:32 pm    Post subject: Reply with quote

See http://www.smarty.net/docs/en/language.function.block.tpl

Use the option flags like append, prepend without assignment like
Code:
{block name='foo' prepend}
...
{/block}


For some reasion 3.0 tolerate the assignment.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP