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.
smarty->fetch() behaves like smarty->display()

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
careymorgan
Smarty n00b


Joined: 19 Feb 2004
Posts: 1

PostPosted: Thu Feb 19, 2004 8:14 am    Post subject: smarty->fetch() behaves like smarty->display() Reply with quote

I'm running two web sites with the same version (1.6) of tikiwiki (which uses Smarty). On one site, a particular page works as expected, but on the other site, the content generated by a smarty->fetch() command outputs to the response document instead of stuffing the output into a variable for inclusion in an email message. The template is processed correctly by the fetch() function, but the output just appears in the wrong place

Does anyone know what might be wrong with my Smarty install to cause the fetch() function to misbehave like this?

Here is my code snippet:
$smarty->assign('mail_site',$_SERVER["SERVER_NAME"]);
$smarty->assign('mail_user',$_REQUEST["username"]);
$smarty->assign('mail_pass',$pass);
$mail_data = $smarty->fetch('mail/password_reminder.tpl');
//here is the point that the contents of $mail_data are output to the response stream
Back to top
View user's profile Send private message
omidneo
Smarty Rookie


Joined: 22 Feb 2010
Posts: 12

PostPosted: Sat Jan 07, 2012 10:10 pm    Post subject: I am having the same issue Reply with quote

$smarty->fetch('header.tpl'); behaves as $smarty->display('header.stpl'); end it exits the code without further processing
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 698
Location: Germany, border to Switzerland

PostPosted: Sun Jan 08, 2012 12:36 pm    Post subject: Re: I am having the same issue Reply with quote

omidneo wrote:
$smarty->fetch('header.tpl'); behaves as $smarty->display('header.stpl'); end it exits the code without further processing


This is simply not true.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup 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