Jump to content

Module: Pagination Textformatter


ryan
 Share

Recommended Posts

This Textformatter module for ProcessWire enables you to break up a single textarea field (using either TinyMCE or CKEditor) into multiple pages. You include all of the content in a single rich text field and separate each pagination with a line of hyphens (5+). When rendered on the front-end, the user will see pagination links at the bottom of the page enabling them to move forward and backward through the content/article.
 
Also included is the option for title pagination. That means assigning a title/headline to each pagination and giving the user a list of those titles they can click on to move to each section of the article.

post-2-0-89460000-1403901202_thumb.png

  • Like 17
Link to comment
Share on other sites

When rendered on the front-end, the user will see pagination links at the bottom of the page enabling them to move forward and backward through the content/article. Also included is the option for title pagination. That means assigning a title/headline to each pagination and giving the user a list of those titles they can click on to move to each section of the article.

Thanks Ryan, looks this also comes in very handy to quickly setup a blog function.

  • Like 1
Link to comment
Share on other sites

Here is a companion module (my first public module).

Accordion Textformatter

I've had this kicking around for a while. After you released Pagination, I figured I would update it and get it out there.

Same idea essentially, but creates collapsed "accordion" content instead of pagination.

Hope you don't mind, I leaned heavily on some of your code for the markup pattern. I wanted to make them essentially interchangeable (not that you ever would).

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...
  • 11 months later...

I'm using pagination on a site where it is outputting articles, and i'm also setting up a "Printer Friendly" view for the page, which would output the whole page body, but i'm having trouble 'unsetting' the pagination textformatter.

Any tips on how to do that (i've tried a bunch of things, like $page->getUnformatted('body'), and $page->of(false)... but nothing seems to work - i always get the paginated version; i don't think it could be cached because the print view is generated off a url param (?printerFriendly=true)

i guess i could apply the textformatter at runtime to the field where pagination is required - is that the best way to approach this?

Link to comment
Share on other sites

  • 10 months later...
On 7/25/2015 at 4:46 PM, Macrura said:

I'm using pagination on a site where it is outputting articles, and i'm also setting up a "Printer Friendly" view for the page, which would output the whole page body, but i'm having trouble 'unsetting' the pagination textformatter.

Any tips on how to do that (i've tried a bunch of things, like $page->getUnformatted('body'), and $page->of(false)... but nothing seems to work - i always get the paginated version; i don't think it could be cached because the print view is generated off a url param (?printerFriendly=true)

i guess i could apply the textformatter at runtime to the field where pagination is required - is that the best way to approach this?

Hi Macrura, 

any chance you've solved this? Any tips?

Nevermind! I figured it out.

$page->getUnformatted('body'); 

It works, now I just have to remove the "----- title xyz"  shortcodes from the content. 

Edited by Sérgio
Figured it out.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...