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

How can i Store Template Output into PHP Variable instead of

 
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 -> Tips and Tricks
View previous topic :: View next topic  
Author Message
msameerbutt
Smarty Rookie


Joined: 02 Oct 2003
Posts: 11
Location: India

PostPosted: Tue Jul 27, 2004 10:57 am    Post subject: How can i Store Template Output into PHP Variable instead of Reply with quote

Hi There
How can i Store Template Output into PHP Variable Instead of displaying it
Please Help Me
Regards
_________________
Hi I am New Comer
But Every one has this stage i will struggle hard need your help

thanks
Back to top
View user's profile Send private message MSN Messenger
messju
Administrator


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

PostPosted: Tue Jul 27, 2004 11:28 am    Post subject: Reply with quote

read the faq. it's in the wiki.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
msameerbutt
Smarty Rookie


Joined: 02 Oct 2003
Posts: 11
Location: India

PostPosted: Wed Jul 28, 2004 5:27 am    Post subject: Reply with quote

Yes i Found that Problem in FAQ Section

------------------------------------------------------------------------------
Q: Is there anyway to send the compiled template code to a variable instead of $smarty->display() that output's it ? (I want to create a template for mail e.g)
A: use $smarty->fetch($name_of_template_file)-
------------------------------------------------------------------------------

But My problem is not solved Because the Above code Store Template out put in smarty Variable , but i want to store in a Php Variable. Actually i want to send that Template in mail as well as display. Can you Pls Tell me how can i do that hope you understand my problem

Regards
_________________
Hi I am New Comer
But Every one has this stage i will struggle hard need your help

thanks
Back to top
View user's profile Send private message MSN Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jul 28, 2004 6:06 am    Post subject: Reply with quote

[php:1:229a060222]<?php
$php_variable = $smarty->fetch($name_of_template_file);
?>[/php:1:229a060222]
Back to top
View user's profile Send private message
msameerbutt
Smarty Rookie


Joined: 02 Oct 2003
Posts: 11
Location: India

PostPosted: Wed Jul 28, 2004 9:17 am    Post subject: Reply with quote

Thank you Very Much
Problem is Solved
Regards Laughing
_________________
Hi I am New Comer
But Every one has this stage i will struggle hard need your help

thanks
Back to top
View user's profile Send private message MSN Messenger
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 -> 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