For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > February 2005 > Strange behavior w/ Smarty and PEAR:Pager









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Strange behavior w/ Smarty and PEAR:Pager
Bob

2005-02-07, 4:06 pm

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?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com