ryan Posted June 27, 2014 Posted June 27, 2014 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. Example of this module in action Documentation and customization options GitHub Page Module Page Download ZIP Install class: TextformatterPagination 17
yellowled Posted June 27, 2014 Posted June 27, 2014 Ryan, the example page for the module throws a 404. (Forgot to publish?) 1
ryan Posted June 27, 2014 Author Posted June 27, 2014 you are right, I forgot to publish. (it's Friday, end of the day, excuses and such) 1
pwired Posted June 28, 2014 Posted June 28, 2014 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. 1
3fingers Posted June 28, 2014 Posted June 28, 2014 For me it's a great news, very handy module that could come in play in a lot of situations. Thanks a lot! 1
ryan Posted July 2, 2014 Author Posted July 2, 2014 Here's a live example of the Pagination Textformatter in action at CMS Critic: http://www.cmscritic.com/how-to-create-a-social-network/ I've also updated this module to version 2, which adds an API giving you further control over pagination. 2
renobird Posted July 7, 2014 Posted July 7, 2014 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). 3
ryan Posted July 12, 2014 Author Posted July 12, 2014 I've updated this module to version 3 which adds the ability to use headlines as page breaks and adds support for several shortcodes. 4
Pete Posted August 7, 2014 Posted August 7, 2014 Not sure how I missed this one, but it looks fantastic for article-heavy sites. Thanks ryan!
Macrura Posted July 25, 2015 Posted July 25, 2015 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?
Sergio Posted June 22, 2016 Posted June 22, 2016 (edited) 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 June 22, 2016 by Sérgio Figured it out.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now