News module pageNumber / pageCount problem
Posted: Fri Jul 27, 2007 4:01 pm
Hi,
i'm new to cmsmadesimple and found a strange 'error', i would not report it as a bug, so i'm posting it here.
Don't know if anyone else had the problem, but the message buttons of the next / prev pages are not working properly. In the default Summary Template it's code is displayed as follows:
I my case it showed a 'next' option, when there was no item in the next page.
Found the error in the following file: modules/News/action.default.php, line:158/159:
change:
to:
Hope someone can use this,
Greetings Excidium
i'm new to cmsmadesimple and found a strange 'error', i would not report it as a bug, so i'm posting it here.
Don't know if anyone else had the problem, but the message buttons of the next / prev pages are not working properly. In the default Summary Template it's code is displayed as follows:
Code: Select all
<!-- Start News Display Template -->
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
Found the error in the following file: modules/News/action.default.php, line:158/159:
change:
Code: Select all
$pagecount = intval($row2['count'] / $pagelimit);
if( ($pagecount % $pagelimit) != 0 ) $pagecount++;
Code: Select all
$pagecount = ceil($row2['count'] / $pagelimit);
Greetings Excidium