pagination function does not work in listcontent.php
Posted: Thu Jun 22, 2006 5:58 am
hi.i'm using cmsmadesimple-0.13beta4 with PHP Version 4.3.10 and apache 2.0.43 as httpserver.
i edit 'Number of Content Items to show per/page in Page List' in userpreference(editprefs.php) to '10'.now the problem is when i have more than 10 content in my content list,all of them will be shown in just one page.but pagination function in other pages work!
the code in listcontent.php is like this:
while $counter is always equal to one(even if i have no content in the list!)
but count($pagelist) shows the number of contents + 1.(i mean when i have 12 content in my list,it returns 13).
so i replace with .now the links for next and prev. pages appear, but each page shows all of the contents!(i have 13 contents,and so 2 pages.but listcontent.php?page=1 and listcontent.php?page=2 shows all contents)
i edit 'Number of Content Items to show per/page in Page List' in userpreference(editprefs.php) to '10'.now the problem is when i have more than 10 content in my content list,all of them will be shown in just one page.but pagination function in other pages work!
the code in listcontent.php is like this:
Code: Select all
if ($limit != 0 && $counter > $limit)
{
$thelist .= "<p>".pagination($page, $counter, $limit)."</p>";
}
but count($pagelist) shows the number of contents + 1.(i mean when i have 12 content in my list,it returns 13).
so i replace
Code: Select all
if ($limit != 0 && $counter > $limit)
{
$thelist .= "<p>".pagination($page, $counter, $limit)."</p>";
}
Code: Select all
if ($limit != 0 && count($pagelist) > $limit)
{
$thelist .= "<p>".pagination($page, count($pagelist), $limit)."</p>";
}