Strange behavior w/ Smarty and PEAR:Pager

From: Date: Mon, 07 Feb 2005 10:48:00 +0000
Subject: Strange behavior w/ Smarty and PEAR:Pager
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12230@lists.php.net to get a copy of this message
I was working on getting PEAR::Pager working with Smarty when I ran into a strange behavior. In my template file I was using {section name=x loop=$data} to loop through my results. It worked but it would only produce the 1st page of results... if you clicked "next" to go to the next page of results, the page would load but no data was presented... you just got an empty template with no error message. Over on the PEAR mailing list I found a post from someone who had the exact same problem and a reply from someone else who suggested to use {foreach} instead of {section}. I tried it and it worked perfectly. My question is: is this a bug. If not, what's the difference between {section} and {foreach} that would cause this?

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