ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Split content over multiple pages + with specific page break points?

October 05, 2013 6:18am

Subscribe [4]
  • #1 / Oct 05, 2013 6:18am

    dhjones

    25 posts

    Hello,

    Thanks for reading; I want the abiity to span content items over several pages and have something like;

    /recipe/blah
    /recipe/blah/1
    /recipe/blah/2

    I see there is support for this in 2.7.1 but I also want to be able to force a page break, how can I do this? Something like {page_break} would be the ideal!

    I found this simple pagination;  but its very old, and I wonder if the functionality I need is now baked into EE.

    Any ideas?

  • #2 / Oct 05, 2013 1:31pm

    Jeremy S.

    353 posts

    Have you had a chance to look through the EE documentation?:
    http://ellislab.com/expressionengine/user-guide/modules/channel/pagination_spanning.html

    Is that something that helps?

  • #3 / Oct 05, 2013 3:02pm

    dhjones

    25 posts

    That doesnt allow me to have control over where the page break is, for example I might decide after a long <table> of data I want to add a {page break}... basically more granular control

  • #4 / Oct 05, 2013 3:28pm

    Jeremy S.

    353 posts

    What do you mean? You create multiple content fields in your channel. Content1, Content2, Content3 etc. instead of a single content field.  When you want a break you start your content in the next field.  That or Simple Pagination add-on, are basically the two options I have ever used or seen used.

  • #5 / Oct 05, 2013 3:31pm

    dhjones

    25 posts

    It doesnt feel very elegant that way, I don’t want to have to create a page content item for every page chunk (Imagine I had ten pages!).

    So say I have a long article, I want to be able to add…

    <content>

    {page_break}

    <content>

    content


    Then I would have three pages of content. One way you suggest is massively inefficient, and the second is too simplistic. Someone else must have had this need?

    Simple pagination looks almost right, but I cant see an example of it also allowing the page break to be at a specific location? Care to show an example? With some lorem?

  • #6 / Oct 05, 2013 4:27pm

    Jeremy S.

    353 posts

    You literally type “{pagebreak}” in your content and you have one. It’s EXACTLY what you are asking for, so I am not sure the hesitation to try Simple Pagination.  It’s free, just try it. You don’t like it, disable or uninstall it.

    My name is Bob. This is page one.
    
    {pagebreak}
    
    My last name is Smith. This is page two.
  • #7 / Oct 06, 2013 6:40am

    dhjones

    25 posts

    Looks like it doesnt work in EE 2.7.1, it works locally on my 2.5.1 but my production environment uses 2.7.1

    It might be that its because {pagebreak} gets converted to html entities in the content, but im unsure how to stop that.

  • #8 / Oct 06, 2013 7:49am

    dhjones

    25 posts

    Spoke to the developer behind Simple Pagination and it would appear its not under active development so if it is the upgrade thats broken it - the issue won’t be fixed?

    Does anyone have simple pagination working on 2.7.1? Ideas for alternatives welcome too.

  • #9 / Oct 20, 2013 6:48pm

    dhjones

    25 posts

    Nobody has a solution or suggestion? Surely this is a commonplace feature? The ability to spread a page of content over X pages and having some control over those breakpoints?

    How is this done with 2.7.2?

    Anyone? Please!

  • #10 / Oct 24, 2013 4:10pm

    dhjones

    25 posts

    What about the ability to have a {placeholder} within a WYSIWYG content entry that when displayed on a page is replaced with an adsense unit, how would I do that.

    I would consider paying someone a small fee if they can present a solution to splitting long articles over several pages, and allowing custom breakpoints?

    like

    {split over="3"}

    content
    {new_page}
    content 2
    {new_page}

    {/split}

    To give me pagination for two pages of content…

  • #11 / Oct 28, 2013 7:21am

    Ralph

    78 posts

    Interesting problem. You could use the Explode add-on and have a conditional to get the correct page number a bit like this (untested!)

    {exp:explode separator="[pagebreak]" string="{content}"}
    {if exp_count==segment_2}
    {exp_value}
    {/if}
    {/exp:explode}

    and then use paging like this:

    <ul>
    {exp:explode separator="[pagebreak]" string="{content}"}
    <li><a href="/{segment_1}/{exp_count}">page {exp_count}</a></li>
    {/exp:explode}
    </ul>

     

  • #12 / Oct 28, 2013 12:09pm

    Rob Allen

    3114 posts

    If you use Matrix (or Grid) fieldtype you can do pseudo pagination with clever use of data structure:

    Set up your Matrix/Grid with two columns:

    Heading (grid_heading) - used for section/page heading
    WYSIWYG (grid_content) - used for content blob

    Add your content, each row you can show in one page view or separate page views.

    You can then call each grid row like this:

    {!-- get the first grid row if segment 3 is empty --}
    {if segment_3 == ""}
    {my_custom_field row_id="1"}
        <h2>{grid_heading}</h2>
    <p>    {grid_content}<br />
    {/my_custom_field}<br />
    {/if}</p>
    
    <p>{!-- get the grid row if segment 3 is not empty --}<br />
    {if segment_3 != ""}<br />
    {my_custom_field row_id="{segment_3}"}<br />
        </p><h2>{grid_heading}</h2>
    <p>    {grid_content}<br />
    {/my_custom_field}<br />
    {/if}

    The syntax is similar for Matrix and Grid fieldtypes.

  • #13 / Oct 28, 2013 12:11pm

    Jeremy S.

    353 posts

    {!-- get the first grid row if segment 3 is empty --}
    {if segment_3 == ""}
    {my_custom_field row_id="1"}
        <h2>{grid_heading}</h2>
    <p>    {grid_content}<br />
    {/my_custom_field}<br />
    {/if}</p>
    
    <p>{!-- get the grid row if segment 3 is not empty --}<br />
    {if segment_3 != ""}<br />
    {my_custom_field row_id="{segment_3}"}<br />
        </p><h2>{grid_heading}</h2>
    <p>    {grid_content}<br />
    {/my_custom_field}<br />
    {/if}

    Nice!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases