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.

pageinate single entry across multiple pages ?

September 03, 2010 11:21am

Subscribe [7]
  • #1 / Sep 03, 2010 11:21am

    phoebe_reed

    82 posts

    Hi,

    I’ve ready everything I can find on the web and on the forums site about pagination, but everything relates to comments and/or list entries.  I installed Simple Pagination and tried to get it to work w/ single entry, but have failed.

    We have really long blog posts that need to be paginated, dynamically depending on their varying lengths.  I am sure that people have done this with EE already, but I can’t see how or where.

    I’m on 1.6.8.

    Thanks,
    Phoebe

  • #2 / Sep 03, 2010 11:24am

    Ingmar

    29245 posts

    Have you seen this page? Is that what you’re looking for?

  • #3 / Sep 03, 2010 11:33am

    phoebe_reed

    82 posts

    Maybe!  I’m not sure yet if this will generate the right output.  Right now when I use it, it fails…

    I get this back on the webpage itself:

    World Business Forum 2010
    Last updated on Sep 02, 2010 at 03:35 PM
    {paginate}
    
    Page {current_page} of {total_pages} pages for this article {pagination_links}
    {/paginate}

    I’m not sure what I need to enable or disable to get this to work… is there a preference or plugin I need for this to work?  Hm…...

  • #4 / Sep 03, 2010 4:29pm

    Brandon Jones

    5500 posts

    Hi phoebe_reed, can you show us a simplified template that you’re working with, including the exp:weblog:entries tags?

  • #5 / Sep 03, 2010 4:39pm

    phoebe_reed

    82 posts

    .....
    
    {exp:weblog:entries weblog="weblog_name" limit="1" rdf="off"  paginate_type="field" paginate="bottom"}
    
    {fullblog}  [that is the field name of the field we would like to have paginate]
    
    {multi_field="page1|page2|page3|page4"}
    
    {paginate}
    Page {current_page} of {total_pages} pages for this article {pagination_links}
    {/paginate}        
    
    ....
    {/exp:weblog:entries}

    This template shows the “fullblog” field in it’s entirety.  I am obviously missing something because I have no idea where to set the pagination rule… like, how would it know where to paginate the entry?  after certain number of words or characters or paras??

    Thanks for any help…..

    -phoebe

  • #6 / Sep 03, 2010 9:27pm

    Brandon Jones

    5500 posts

    Hi phoebe, the key is the multi_field variable which tells EE which fields to use for each page.

    For the code you have above, you would need custom fields named “page1”, “page2”, etc. each with the content that should be displayed on each page. A single field will not be broken into multiple pages.

  • #7 / Sep 04, 2010 5:33am

    digitalformula

    176 posts

    Hi phoebe,

    I battled with Simple Pagination for a while too until I discovered that I was just missing the {pagebreak} trag inside the entry’s main body.  Once I had that at each point I wanted to split the entry, Simple Pagination worked flawlessly.

    Personally I found the EE built-in ‘field’ method quite cumbersome which is why I went with Dom’s Simple Pagination plugin.  My Simple Pagination ‘code’ looks like this ... obviously ‘body’ is the field that has the {pagebreak} tags in it.

    {exp:pagination paginate="bottom"}
        {body}
        {simplepaginate}
            
                {all_pagination_links}
                {if previous_page}
                    « <a href="http://{previous_auto_path}" title="Previous Page">Previous Page</a>
                {/if}
                {if next_page}
                    <a href="http://{next_auto_path}" title="Next Page">Next Page</a> »
                {/if}
            </[>
        {/simplepaginate}
    {/exp:pagination}

    Hope that helps you.

  • #8 / Sep 04, 2010 6:12pm

    Greg Salt

    3988 posts

    Hi Phoebe,

    How are you getting on with this?

    Cheers

    Greg

    @digitalformula, thanks very much for the help.

  • #9 / Sep 07, 2010 4:52pm

    phoebe_reed

    82 posts

    Hi everyone,

    thanks for all the help.

    we went with the multiple fields option and that works great for us in this particular case.

    However, I have one new problem/question that has come up that I can’t solve yet….

    The multi_field solution works great on pages where I’m using dynamic to display a weblog entry.

    However, half of my pages don’t use dynamic, because they are using the URL to both indicate weblog as segment_3, and then the title in segment_4.  These pages work on page 1 of the entry, but completely fail when we click to “page 2” of the entry. 

    My code on these pages looks like this:

    {exp:weblog:entries weblog="{segment_3}" dynamic="off" url_title="{segment_4}"   paginate_type="field" paginate="bottom"}

    (The rest of the page is identical to the pages that do work and use dynamic.)

    If there a way to get the pagination working when i have dynamic=off?  Or is there a way I can get this info from the URL still using dynamic?


    -phoebe

  • #10 / Sep 08, 2010 4:05am

    John Henry Donovan

    12339 posts

    phoebe,

    Try removing dynamic=“off”. Pagination indeed will not work without it. You are referencing url_title so that should still catch your entry for you.

    What does your URL look like? Why do you need to reference a weblog in there?

  • #11 / Sep 08, 2010 11:59am

    phoebe_reed

    82 posts

    That doesn’t help.  When I remove dynamic=“off”, the page does still retrieve the correct entry, but the pagination breaks on the second multi field.  the page has no content inside the tag, and then shows the code {/exp…} so it’s almost like the syntax gets broken.  On pages where I am not needing to pass the weblog name as well as the entry title url, the pageination works.  So it’s the entry tag difference that is causing the issue.

    My current tag looks like this:

    {exp:weblog:entries paginate_type="field" paginate="bottom" weblog="{segment_3}" url_title="{segment_4}" }

    My URL like this:
    http://domainname/language_code/directory_name/template_name/weblog_name/url_title

    When I remove the “weblog=...” and “url_title=...”, I get the title of the entry returned, but none of the other fields, so I do not believe the entry tag is able to retrieve. I have 14 weblogs that point to this page.. this is so we have one template instead of 14 templates, one for each weblog. 

    Please help if possible….

    thanks so much,
    Phoebe

  • #12 / Sep 08, 2010 6:27pm

    Brandon Jones

    5500 posts

    Hi Phoebe,

    Before we go further can we get you to update to 1.6.9 so we’re all on the same page? Keep us posted, please.

  • #13 / Sep 08, 2010 6:33pm

    phoebe_reed

    82 posts

    hi,

    thanks.

    I’ll update tomorrow AM and let you know… do you think the update will solve the problem? 

    -p

  • #14 / Sep 09, 2010 9:26am

    Sue Crocker

    26054 posts

    Phoebe, we don’t know for certain if that will help or not, but it will make it easier to troubleshoot if we are on the same version/build.

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

ExpressionEngine News!

#eecms, #events, #releases