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

syntax for accessing parent block content not working

 
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
matterk
Smarty n00b


Joined: 25 Aug 2009
Posts: 2

PostPosted: Tue Aug 25, 2009 9:55 pm    Post subject: syntax for accessing parent block content not working Reply with quote

From the latest svn trunk, if I try

[code]
{block name="head"}
{$smarty.block.head.parent}
{/block}
[/code]

I don't get the content from the parent block. Looking at the compiled template it looks like it just gets ignored. Has anyone been able to get this to work? Is there a different syntax?
Back to top
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 541

PostPosted: Wed Aug 26, 2009 11:52 am    Post subject: Re: syntax for accessing parent block content not working Reply with quote

Is there documentation for this feature yet? I haven't heard of this, but I would like to know how it's supposed to work.
Back to top
View user's profile Send private message
matterk
Smarty n00b


Joined: 25 Aug 2009
Posts: 2

PostPosted: Wed Aug 26, 2009 3:38 pm    Post subject: Reply with quote

I saw this in another thread:

[quote="U.Tews"]It has been changed now to

{$smarty.block.foo.parent}[/quote]

But I can't seem to get it to work.
Back to top
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 541

PostPosted: Wed Aug 26, 2009 8:37 pm    Post subject: Reply with quote

matterk wrote:
I saw this in another thread:

U.Tews wrote:
It has been changed now to

{$smarty.block.foo.parent}


But I can't seem to get it to work.



ok... you're talking about template inheritance.

haven't tried it yet.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Aug 27, 2009 12:00 am    Post subject: Reply with quote

try:

{$smarty.block.parent.foo}
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Thu Aug 27, 2009 12:52 am    Post subject: Reply with quote

see also my answer at http://groups.google.com/group/smarty-developers/browse_thread/thread/5b72731b86d2cf2d/cf4593b0bb7f3581#cf4593b0bb7f3581
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