Page 1 of 1

News pagination

Posted: Tue Dec 13, 2016 2:53 pm
by gergo2007
Hi

I have a client that had a site made in CMS Made Simple, but the company that made the site forgot to add pagination to the news.

The summary template was remade but when i switch it back to the original I still don't see the pagination.
If I'm not mistaken this is the original pagination code:

<!-- news pagination -->
{if $pagecount > 1}
<span class='paginate'>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</span>
{/if}
</ul>
<!-- .news-summary //-->

But it's not showing anything if I switch to it. CMS Made Simple version 1.11.13 is used and News module 2.15.

Any tips/ideas are appreciated.

Thanks!

Re: News pagination

Posted: Tue Dec 13, 2016 3:44 pm
by gergo2007
Just figured it out that it actually works, but the page limit is 10 posts/page.

How do i edit that?

Re: News pagination

Posted: Tue Dec 13, 2016 5:33 pm
by paulbaker
From the module help:
Parameters

(optional) pagelimit="1000" - Maximum number of items to display (per page). If this parameter is not supplied all matching items will be displayed. If it is, and there are more items available than specified in the parameter, text and links will be supplied to allow scrolling through the results. The maximum value for this parameter is 1000.
Your CMSMS is out of date and needs upgrading:
https://docs.cmsmadesimple.org/upgradin ... nformation

Re: News pagination

Posted: Tue Dec 13, 2016 7:40 pm
by gergo2007
paulbaker wrote:From the module help:
Parameters

(optional) pagelimit="1000" - Maximum number of items to display (per page). If this parameter is not supplied all matching items will be displayed. If it is, and there are more items available than specified in the parameter, text and links will be supplied to allow scrolling through the results. The maximum value for this parameter is 1000.
Your CMSMS is out of date and needs upgrading:
https://docs.cmsmadesimple.org/upgradin ... nformation
Thanks!
But the foreach selects the items and i dont think this parameter would work there.

Re: News pagination

Posted: Wed Dec 14, 2016 12:01 pm
by paulbaker
You call it in your page or template with something like this:

Code: Select all

{news pagelimit="5"}
If it doesn't work something else is wrong somewhere so post your template(s).