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

Evaluate Smarty code within block functions

 
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 Development
View previous topic :: View next topic  
Author Message
wvdploeg
Smarty Rookie


Joined: 05 Aug 2003
Posts: 19

PostPosted: Wed Jan 12, 2005 9:17 pm    Post subject: Evaluate Smarty code within block functions Reply with quote

When I write a block function and want to have the smarty code evaluated WITHIN the function, what should be the proper way to do it ?

For example, I want to make a block function doing some actions with each element in an array and create some output. foreach and section are to limited for what I want.... But when I create a block function, I get the EVALUATED data... I want the unvaluated data to evaluate it in my function....

Any help ?

.... PLEASE !

Wilko
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Jan 13, 2005 12:10 pm    Post subject: Re: Evaluate Smarty code within block functions Reply with quote

wvdploeg wrote:
When I write a block function and want to have the smarty code evaluated WITHIN the function, what should be the proper way to do it ?


you can't.

Quote:
For example, I want to make a block function doing some actions with each element in an array and create some output. foreach and section are to limited for what I want.... But when I create a block function, I get the EVALUATED data... I want the unvaluated data to evaluate it in my function....


and in nearly all cases you don't need.

the block-contents get evaluated on the next iteration of your block.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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 Development 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