Re: [SMARTY] A Small Bug? Please advise...

From: Date: Thu, 06 May 2004 13:16:05 +0000
Subject: Re: [SMARTY] A Small Bug? Please advise...
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11364@lists.php.net to get a copy of this message
The debug console only shows the variables assigned when display() is called, not anything assigned during execution of the template. You can see the currently assigned vars by using {debug} inside the template after your assignment. Alex wrote:
Hi, while developing smarty functions for my CMS I have stumbled a small bug, that does not affect operation of smarty, but causes some pain for the web developer. The bug concerns the debug console. In my system, I have tempaltes nestes inside each other (duh!), for example like this index.htm (0.11989) langs.en [] global (0.00329) article.htm (0.06870)
      ratings.html (0.02205)
      langs.en [ratings] global (0.00475)
Now, I also have written some smarty functions to load some CMS specific data, the function is called in ratings.html with a tag like this {keywords max=5 var=keywords} The functions works like a charm, fetching a set of keywords from the database and passing them to a smarty variable called "keywords" in form of an array. Wonderful. The problem is, however, that the debug console does not display the $keywords array, although smarty has it, as I can access it in the template and outout it =(( Nonetheless, if I call the very smae function from the top level templates index.html, then $keywords pop up in the debug console. This behaviour can be tested with a simple {assign var=foo value=bar} function with a set of nested templates. Please advise it is my bad, or really a bug that needs fixing =) I am searching for a solution myself, but this may take a while, best regards, Alex


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