Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Q: related to {capture}

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
sponge2
Smarty n00b


Joined: 21 Feb 2004
Posts: 1

PostPosted: Sat Feb 21, 2004 7:54 am    Post subject: Q: related to {capture} Reply with quote

Code:
"file_html.tpl" contents:

{capture name="block_1"}
 {$something}
{/capture}

{assign var="something" value="let's see it visible"}
{$smarty.capture.block_1}


"show.php" contents:
<...>
$smarty->display("file_html.tpl");

this example brings blank screen, because it seems that variable "$something" is NOT reached inside the capture "block_1".
Is that a missing feature, or i just don't know how to make this?

thank you.
Back to top
View user's profile Send private message
messju
Administrator


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

PostPosted: Sat Feb 21, 2004 9:16 pm    Post subject: Reply with quote

{capture} captures the output, not the template source.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks 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