Although EE is a brilliant CMS I have found it’s pagination support a little lacking, even compared to something as basic as Wordpress. Fortunately the plugin system provides a decent opportunity to make up for any shortfalls and hopefully ‘Simple Pagination’ does just that.
Additional details can be found on my blog but basically this plugin makes it possible to split up entries into an unlimited number of pages by adding a {pagebreak} tag to a message.
Fairly detailed usage info is available in the usage section after you install the plugin and the features are very similar to the standard EE ones so the manual page is probably fairly useful too.
Any questions just let me know, I look forward to seeing some examples of the plugin in use (demo here). 😊
Glad to be of use guys!
One thing that I’ve just realised I have forgotten to mention is the optimum placement of any {pagebreak} tags. This only really matters if you’re using the XHTML formatting option but what you want to do is have two linebreaks before and after as if this will ensure that the final tag is closed at the end of the page and likewise that if the next page starts with text then it also begins with a fresh tag.
... end of one page here.
{pagebreak}
Another page gets started here.
This is required as EE adds any automatic formatting before sending the data to the plugin and as {pagebreak} acts as a divider between pages absolutely anything to the left of the tag will go one page one and anything to the right will be on page two. So if you used the following:
...end of my paragraph.{pagebreak}
New paragraph here.
You’d end up with page one containing:
...end of my paragraph.
And page two containing:
New paragraph here.
Which isn’t likely to be very desirable.
end of my paragraph.{pagebreak}
New paragraph here.
? In template? What determines where the page break then? Paragraphs or? Sorry if I’m being dense, just woke up (thats my excuse and I’m stickin to it) lol ok, with some coffee it all came together. (Note: add to docs, “have 2 coffee, then read instructions”) Well done!
{pagebreak} tags split up the pages, but you don’t need the EE tags plugin. Call it black magic if you like. 😉
All the info you need to use the plugin is available in your control panel’s plugin manager after installing it. If after having a look at that you’re still unsure then just let me know.
I have featured the use of this excellent solution in my EE Wiki entry - Automatic Spanning of Book Length Entries Across Multiple Pages. It was the most important part of making this all work!
So, Thanks Thanks Thanks!
Terry
Dom.S: From your comment above, were you saying it doesn’t close open tags? Anyway to modify the plugin to close open tags on the ends of pages and create any beginning tags for those with only closing tags?
I’m just thinking of this from the perspective of me creating a site for an end user. So while we all may be alert enough to make sure all tags are closed before we insert the {pagebreak}, some end users are not that knowledgeable. Having unclosed/unopened tags would certainly cause some issues with page display.
correct. i am aware that the {page_break} itself isn’t a tag. I’m talking about when there are tags within the body (which is what he was saying as well). So if you put a {page_break} in the middle of a bolded section. There will be no </strong> on the first page and only a </strong> on the next page. That could be a problem.
And while it is easy to say “make sure all of your tags are closed”. An end user who has no idea about html won’t have a clue what that means…and will more than likely not do it correctly.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.