0

I have using structure, but in my listing page pagination does not working properly. pagination links are changed but records are display at it is. means every time same records display.

I have using structure, freebie, zoo triggers and stash.

My script is given below:

{embed="_layouts/index"}

{exp:stash:set name="meta"}
{exp:seo_lite use_last_segment="yes"}
{/exp:stash:set}

{exp:stash:set name="content"}
<section id="content">
    <div class="inner-container">
        <span class="logo-icon"></span>
        <span class="left-line"></span>
        <span class="right-line"></span>

        <div class="row">
            <div class="col-md-8 col-sm-8">
                <section id="left-side">

                    {embed='home/breadcumb'}

                    {exp:channel:entries channel="pages" dynamic="yes" disable="categories|category_fields|member_data|pagination|trackbacks"}
                        <h1>{title}</h1>
                        {page_content}
                    {/exp:channel:entries}
                    <div class="clear"><!-- --></div>


                    <section class="all-list">
                    {exp:channel:entries channel="parliamentarian" parse="inward" dynamic="no" paginate="bottom" limit="10" disable="categories|category_fields|member_data|trackbacks"}
                        <div class="listing {switch='odd|even'} cf">
                            <div class="member-image">
                                {member_image}
                                    <img src="{image:url:small}" />
                                {/member_image}
                            </div>
                            <h2><a href="{page_uri}">{title}</a></h2>
                            <a href="{page_uri}" class="details-arrow">Read More</a>
                        </div>
                        {paginate}
                          {pagination_links}
                              <div class="paging">
                                <span class="page-name">Page({current_page}):</span>
                                  {first_page}
                                          <a href="{pagination_url}" class="first">First</a>
                                  {/first_page}

                                  {previous_page}
                                          <a href="{pagination_url}" class="prev">Prev</a>
                                  {/previous_page}
                                  {page}
                                          <a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}current{/if}">{pagination_page_number}</a>
                                  {/page}
                                  {next_page}
                                          <a href="{pagination_url}" class="next">Next</a>
                                  {/next_page}

                                  {last_page}
                                          <a href="{pagination_url}" class="last">Last</a>
                                  {/last_page}
                              </div>
                          {/pagination_links}
                        {/paginate}
                    {/exp:channel:entries}
                    </section>

                </section>
            </div>

            <div class="col-md-4 col-sm-4">
                {embed='pages/right-side'}
            </div>        
        </div>
    </div>
</section>
{/exp:stash:set}

Please help me how to solve it ?

Thanks

2 Answers 2

0

I'm having the same issue; did you solve your issue?

My pagination links/url are changing but the displayed entires is always the same i.e.

url: http://example.com/news/ entries: 1,2,3

url: ...news/p1 entries: 1,2,3

when I'd expect:

url: http://example.com/news/ entries: atricle-1,atricle-2,atricle-3

url: ...news/p1 entries: atricle-4,atricle-5,atricle-6

My very basic code is:


{exp:channel:entries
    channel="news"
    disable="categories|category_fields|member_data"
    orderby="date"
    sort="desc"
    limit="3"
    paginate="bottom"
    dynamic="no"
}
    {title}
    {paginate}
    Page {current_page} of {total_pages} pages {pagination_links}

{/paginate} {/exp:channel:entries}

If I move the code out of a 'page' defined as a lister in Structure it works as expected.

Any ideas?

Structure 3.3.14.7 ExpressionEngine 2.9.2 Build 20141004

Any help much appreciated.

2
  • ok - found the solution - need to disable 'enable_sql_caching': structure.tenderapp.com/discussions/problems/…
    – anchovy
    Mar 19, 2015 at 20:41
  • 1
    Hi user2484138, glad you found a solution and thanks for adding that comment! For future reference... it is best to post your question as a "new question" rather than as an answer. And if you do find the answer please post as an answer (and feel free to answer your own question).
    – Alex Kendrick
    Mar 20, 2015 at 16:11
0

Sweet - found the solution, need to disable 'enable_sql_caching' as per: http://structure.tenderapp.com/discussions/problems/7675-pagination-not-working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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