Jump to content
ryan

Module: Pagination Textformatter

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

Share this post


Link to post
Share on other sites

Ryan, the example page for the module throws a 404. (Forgot to publish?)

  • Like 1

Share this post


Link to post
Share on other sites

you are right, I forgot to publish. :) (it's Friday, end of the day, excuses and such)

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

For me it's a great news, very handy module that could come in play in a lot of situations.

Thanks a lot!

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Not sure how I missed this one, but it looks fantastic for article-heavy sites. Thanks ryan!

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...