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.

Search results pagination doesn't work.

May 31, 2012 3:50pm

Subscribe [3]
  • #1 / May 31, 2012 3:50pm

    sgoldman

    4 posts

    Code for search form:

    {exp:search:simple_form channel="dbd-blog | work | case_study" search_in="everywhere" no_result_page="search/noresults" paginate="bottom" results="8"}
    <div class="searchbox">
    <input type="text" name="keywords" id="keywords" value="">
    <input type="submit" value="" class="submit">
    </div>
    {/exp:search:simple_form}

    Code on results page:

    {exp:search:search_results}
    <div class="search-result">
    <span class="date">{entry_date format="%l %F %j, %Y"}</span>
    <h2><a href="http://{path=blog/post/{url_title}/}">{title}</a></h2>
    <p>{exp:char_limit total="400"}<br />
    {exp:strip_html}{blog_text}{/exp:strip_html}<br />
    {/exp:char_limit}<br />
    </div><br />
    {paginate}<br />
    Page {current_page} of {total_pages} pages {pagination_links}<br />
    {/paginate}<br />
    {/exp:search:search_results}


    When I search “asp” this outputs 20 results on one page and in each result it shows the ee pagination tags as text. If I move the pagination tags outside of the results loop nothing pagination-related shows up anywhere. My results template is in the default location of search/results. Nothing I try works, what am I doing wrong?

  • #2 / Jun 01, 2012 1:59pm

    Shane Eckert

    7174 posts

    I am sorry to hear you are running into this problem.

    Can you tell me what version of ExpressionEngine you are running?

    Would you mind simplifying things a bit for testing? And can you create a new template?

    {exp:search:simple_form channel="blog" paginate="bottom" results="8"}
    <div class="searchbox">
    <input type="text" name="keywords" id="keywords" value="">
    <input type="submit" value="" class="submit">
    </div>
    {/exp:search:simple_form}
    {exp:search:search_results}
    <div class="search-result">
    <span class="date">{entry_date format="%l %F %j, %Y"}</span>
    <h2><a href="http://{path=blog/post/{url_title}/}">{title}</a></h2>
    <p></div><br />
    {paginate}<br />
    Page {current_page} of {total_pages} pages {pagination_links}<br />
    {/paginate}<br />
    {/exp:search:search_results}

    The code as I have pasted it above work perfectly for me in EE 2.5.

    Please let me know!

    Cheers,

     

  • #3 / Jun 04, 2012 1:59pm

    sgoldman

    4 posts

    I tried your code and it still has the same problem. Just spits out the pagination tags in each iteration like they are plain text.

    I’m in version 2.1.3. Is there a way it works in this version without having to update?

  • #4 / Jun 05, 2012 4:18pm

    Shane Eckert

    7174 posts

    Hey sgoldman,

    It really should work for you.

    Did you create a new template without changing any settings and then put the code in there?

    Please let me know.

    Thank you,

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

ExpressionEngine News!

#eecms, #events, #releases