We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin Release: Simple Pagination

Development and Programming

Dom Stubbs's avatar
Dom Stubbs
156 posts
18 years ago
Dom Stubbs's avatar Dom Stubbs

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.

Download Simple Pagination.

Any questions just let me know, I look forward to seeing some examples of the plugin in use (demo here). 😊

       
Bruce2005's avatar
Bruce2005
536 posts
18 years ago
Bruce2005's avatar Bruce2005

Way to go! I have a client drooling for article pagination and I never had time to go do it in php. This is great! Donation will come 😊

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

I can not tell you how nice it will be to have this to point to, it is a fairly oft-requested feature. I hope you’ll submit it to our plugins site as well!

And the main point of this message - thank you. =)

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
18 years ago
Dom Stubbs's avatar Dom Stubbs

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.

       
Bruce2005's avatar
Bruce2005
536 posts
18 years ago
Bruce2005's avatar Bruce2005
... end of one page here.

{pagebreak}

Another page gets started here.

Does the ee tag above mean it requires the allow EE tags plugin?

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
18 years ago
Dom Stubbs's avatar Dom Stubbs

No as {exp:pagination} goes in your template, not your entry. You then place your field name inside the {exp:pagination} tags and that ensures the field data is processed accordingly.

Hopefully that makes sense, but basically no, all that’s required is the plugin itself.

       
Bruce2005's avatar
Bruce2005
536 posts
18 years ago
Bruce2005's avatar Bruce2005
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!

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
18 years ago
Dom Stubbs's avatar Dom Stubbs

{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.

       
PXLated's avatar
PXLated
1,800 posts
18 years ago
PXLated's avatar PXLated

Very handy!!! Thanks!!!

       
Sasha's avatar
Sasha
85 posts
18 years ago
Sasha's avatar Sasha

Awesome, thank you so much for this plugin!! I have been looking for something like this for ages! :D

       
RichardC's avatar
RichardC
40 posts
18 years ago
RichardC's avatar RichardC

Oh, excellent!

       
tbritton's avatar
tbritton
714 posts
17 years ago
tbritton's avatar tbritton

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

       
james Brown's avatar
james Brown
492 posts
17 years ago
james Brown's avatar james Brown

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.

       
tbritton's avatar
tbritton
714 posts
17 years ago
tbritton's avatar tbritton

He was not saying it left tags open.

The {page_break} things are not “tags” like go in templates, but rather are triggers that go into the body text itself, on the publish page.

Terry

       
james Brown's avatar
james Brown
492 posts
17 years ago
james Brown's avatar james Brown

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.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.