2

I am using {pagination_links} and the code is not rendering.

Here is my complete code for my channel entries:

<section class="blog">

{exp:channel:entries channel="journal" disable="categories|category-fields|member-data" limit="1"}
<article class="blog-summary m-all t-all d1-d4 ">
<time>{entry_date format="%Y-%m-%t"}</time>
<h3>{title}</h3>

<div class="m-all t1-t2 d1-d2">
{journal_text_1}
</div>

<div class="m-all t1-t2 d3-d4">
{journal_text_2}
</div>

{exp:channel_images:images entry_id="{entry_id}"}
<figure class="blog-image m-all t1-t2 d-all"><img src="{image:url:large}"  alt="{image:description}"></figure>
{/exp:channel_images:images}

<hr class="m-all t1-t2 d-all m-clear t-clear d-clear">
</article>

<div class="m-all t1-t2 d-all m-clear t-clear d-clear">
{pagination_links}
    {page}
        <a href="{pagination_url}">{pagination_page_number}</a>
    {/page}
{/pagination_links}
</div>
{/exp:channel:entries}

</section>

And on the front end it renders like this:

{pagination_links} {page} {pagination_page_number} {/page} {/pagination_links}

Am I missing something?

NT

  • What version of EE are you using? EE 2.4.0 introduced some changes to pagination so the syntax may be different. – Erik Reagan Jan 16 '13 at 22:09
  • Sorry, that's 2.3.0, not 2.4.0. – Erik Reagan Jan 16 '13 at 22:16
  • Currently using 2.5.2 – Niall Thompson Jan 16 '13 at 22:33
9

You need to wrap the {pagination_links} tags with {paginate} tags:

{paginate}
    {pagination_links}
        {page}
            <a href="{pagination_url}">{pagination_page_number}</a>
        {/page}
    {/pagination_links}
{/paginate}

See this comment in the docs (which do a crap-tacular job of documenting pagination, btw).

| improve this answer | |
1

The code looks correct to me. I don't think it's a required paramater but try adding paginate='bottom' to your channel entries open tag. That would make it:

 {exp:channel:entries channel="journal" disable="categories|category-fields|member-data" limit="1" paginate="bottom"}
| improve this answer | |
  • Tried that originally but no luck :( – Niall Thompson Jan 16 '13 at 22:08
  • What version of EE? – Erik Reagan Jan 16 '13 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.