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.

Paginate while using Pages module?

July 05, 2007 4:08am

Subscribe [1]
  • #1 / Jul 05, 2007 4:08am

    Adam George

    283 posts

    I am using a weblog:entries tag to pull in a page created via the (EE native 1.6) Pages module, and display it on a single entry page:

    {exp:weblog:entries weblog="static" require_entry="yes" disable="categories|member_data|pagination|trackbacks"}
    <h1>{title}</h1>
    {static_text1}
    {!--{if static_pageorder != ""}{embed="includes/pages_localnav" section="{static_section}" subsection="{static_nav}" pageorder="{static_pageorder}"}{/if}--}
    {/exp:weblog:entries}

    The commented code above pulls in this embedded template:

    <ul>
    {exp:weblog:entries weblog="static" dynamic="off" orderby="static_pageorder" sort="asc" limit="3" static_section="{embed:section}" static_nav="{embed:subsection}" disable="categories|member_data|pagination|trackbacks"}
    {if static_pageorder != "{embed:pageorder}"}{if static_pageorder < {embed:pageorder}}{count}<li>Previous: <a href="http://{page_url}">{title}</a></li>{/if}{if static_pageorder > {embed:pageorder}}<li>{count}Next: <a href="http://{page_url}">{title}</a></li>{/if}{/if}
    {/exp:weblog:entries}
    </ul>

    NB: static_pageorder, static_section, and static_nav are all custom fields designed to enable the pages created to be added to sub-navigation in a specified order.

    Of-course, the links that get output to the page are sometimes wrong because the embedded template does not ‘know’ what the current entry is, so sometimes it displays :

    Previous: blah blah
    Previous: something else

    Instead of the desired result:

    Previous: something else
    Next: another thing

    I am probably not explaining myself very well, but what I am trying to achieve is pagination within the pages created using the Pages module. I have tried to use EE’s pagination but it does not display anything (yes, I made sure pagination was not disabled (as it is in the code above)). Am I doing something wrong (likely) or is this impossible with Pages module?

    Is there a better way to do this?

    Thanks!

  • #2 / Jul 05, 2007 12:20pm

    Lisa Wess

    20502 posts

    Have you tried this in a reduced template without conditionals?  You’re making several jumps here.  Try a simple weblog entries page, with show_pages=“only” and pagination. It should work.

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

ExpressionEngine News!

#eecms, #events, #releases