|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
muralik Smarty Rookie
Joined: 08 Mar 2004 Posts: 25
|
Posted: Wed Jun 23, 2004 5:58 am Post subject: variabled assigned in php not able to use in templates |
|
|
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 |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Wed Jun 23, 2004 5:13 pm Post subject: |
|
|
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 |
|
|
|
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
|