News pagination

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
gergo2007
New Member
New Member
Posts: 3
Joined: Tue Dec 13, 2016 2:32 pm

News pagination

Post 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!
gergo2007
New Member
New Member
Posts: 3
Joined: Tue Dec 13, 2016 2:32 pm

Re: News pagination

Post by gergo2007 »

Just figured it out that it actually works, but the page limit is 10 posts/page.

How do i edit that?
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: News pagination

Post 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
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
gergo2007
New Member
New Member
Posts: 3
Joined: Tue Dec 13, 2016 2:32 pm

Re: News pagination

Post 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.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: News pagination

Post 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).
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Post Reply

Return to “The Lounge”