Subject: | inproper item handling when there are only one |
Date: | Fri, 26 Jan 2007 20:29:31 +0100 |
To: | bug-Template-Plugin-Pagination [...] rt.cpan.org |
From: | Szél Miklós <szel.miklos [...] rivendel.hu> |
An error occurs when there are only one item on a page, instead of
showing the one correctly, it displays many elements without data (as
there is no data to fill them).
This could be a temporary solution:
[% IF page.total_entries == 1 %]
[% FOREACH items IN somedata %]
[% INCLUDE dataform.tmpl %]
[% END %]
[% ELSE %]
[% FOREACH items IN page.page_data %]
[% INCLUDE dataform.tmpl %]
[% END %]
[% END %]
but I don't like this way
Best,
Miklos