Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi there!

Just a few quick questions about the paginate feature. I'm adding a basic news/blog section for the home page of a site i'm building. So far so good but the news section is towards the middle of the page and when I click to navigate to another page it jumps to the top of the page. Is there any way to avoid that?

My second questions is i've got it set up now so that it limits to two posts per page. Is there any way to also limit the number of pages that it'll paginate? I have no idea how often the client will be updating but i'd prefer to keep it to a maximum of maybe 10-20 posts that it'll go back to.

Any help would be greatly appreciated!

Thanks,

Andy
Hi Andy,

The answer to both of your questions is, I am afraid, no - not out of the box.

That said, since you are interested in displaying only a maximum 20 pages (split across pages), I think you can use JavaScript to handle both the requirements you mentioned.

The logic could go like this - don't use 'paginate' parameter of cms:pages at all. Simply set the 'limit' to 20 so that Couch fetches a maximum of that many pages and then use JS to split them into panes, showing one pane at a time.
This way the scroll to top won't happen and you'll always have a max of 20 pages.

Hope this helps.
Thanks for the quick reply!

I kind of figured i'd have to come up with a javascript/Jquery solution for this but wanted to see if there was anything built in that I had missed. I can't tell you how much i've enjoyed developing with Couch the last few months... hopefully my clients love it as much as I do!

Andy
You are welcome, Andy.
I am really glad you liked Couch :)
4 posts Page 1 of 1