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

variabled assigned in php not able to use in templates

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


Joined: 08 Mar 2004
Posts: 25

PostPosted: Wed Jun 23, 2004 5:58 am    Post subject: variabled assigned in php not able to use in templates Reply with quote

I have a PHP script like this
[php:1:5d81275daa]<?php
$smarty->assign('page_desc',stripslashes($page_desc));
$smarty->display("affiliates.tpl");
?>[/php:1:5d81275daa]

and I have template
affiliates.tpl
as

Code:

{include file="head.tpl"}
{$page_desc}
{include file="foot.tpl"}


that variable is working if i keep in head.tpl and not working(displaying) if i keep in affiliates tpl.

what do i need to ?
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Wed Jun 23, 2004 5:13 pm    Post subject: Reply with quote

Check the debug output and try to go from there.

However, I don't really understand this problem: are you saying that the variable only gets displayed as long as you keep the head.tpl inside the affiliates.tpl file?
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 -> Bugs 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