Re: [SMARTY] popup

From: Date: Fri, 19 Nov 2004 22:13:58 +0000
Subject: Re: [SMARTY] popup
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11984@lists.php.net to get a copy of this message
Bertrand Zuchuat wrote:
Le 19 nov. 04, à 10:20, messju mohr a écrit :
{popup caption=$smarty.const.LIBRARY fgcolor="#e2eeff" bgcolor="#D8EEFF" capcolor="#000677" text=$content.library_name}
I tested this. I have a strange result In my popup, i have this result Library (This translate is ok) Array.library_name (This translate is bad) Where is my problem ?
very difficult to say because you are not specific enough about your problem. firstly you should include the actual error message - this helps people to understand your problem. secondly, $content.library_name would equal 'TESTING 123' assuming $tpl was your smarty object. $arr = array('library_name' = 'TESTING 123'); $tpl->assign('content', $arr); so the question is: is 'content' assigned to an assoc. array in your php script? (try using print_r() on the var you are assigning to the template, also check you are not overriding the variable later on, but before output) http://smarty.php.net/docs.php [choose your lang] thirdly have you read the manual? if not please do. I'm sure questions regarding the meaning of specific manual entries will be welcomed (somebody[ies] took alot of time to write them, and knowing people actual bother to read them is nice.) if you dont understand stuff in there. http://smarty.php.net/manual/en/language.variables.php#language.assigned.variables fourthly smarty has a rather fancy debug console which tells you everything about your tpl contents etc etc. its very easy to setup. the value of your 'content' var will also be shown ;-) rgds, Jochem
Thank's Bertrand


« previous php.smarty.general (#11984) next »