0

This is what I have:

{exp:low_search:form 
    result_page="search/clinical-trials/"
    collection="clinical-trials"
}
    <input type="search" name="keywords" placeholder="Search..." value="{low_search_keywords}">
    <button type="submit" class="button button-postfix-search"><i class="fa fa-search"></i></button>
{/exp:low_search:form}

{exp:low_search:results
    collection="clinical-trials"
    status="open"
    limit="10"
    dynamic="no"
    paginate="both"
    pagination_base="search/clinical-trials"
    status="open"
    keywords:inflect="yes"
    keywords:lang="en"
    keywords:mode="auto"
    keywords:loose="right"
    keywords:stem="yes"
}

    <a href="{page_url}/" class="channel {channel}">{title}</a>

    {paginate}
        <ul class="pagination pagination-lg">
        {pagination_links}
        {first_page}
            <li><a href="{pagination_url}">First</a></li>
        {/first_page}
        {previous_page}
            <li><a href="{pagination_url}">&laquo; Previous</a></li>
        {/previous_page}
        {page}
            <li{if current_page} class="active"{/if}><a href="{pagination_url}">{pagination_page_number}</a></li>
        {/page}
        {next_page}
            <li><a href="{pagination_url}">Next &raquo;</a></li>
        {/next_page}
        {last_page}
            <li><a href="{pagination_url}">Last</a></li>
        {/last_page}
        {/pagination_links}
        </ul>
    {/paginate}

{/exp:low_search:results}

It seems like everything is working properly until I look at the pagination URL after I pass a keyword. For example, I entered "cancer" as a keyword in the form and hit submit. This is the page URL:

http://www.example.com/search/clinical-trials?keywords=cancer

But the pagination link is:

http://www.example.com/search/clinical-trials/P10

It's lacking the keywords query! It should be:

http://www.example.com/search/clinical-trials/P10?keywords=cancer

I'm not sure what's going on here? I have the same code in other pages on my site and the pagination links seem to be forming properly.

3

When not using encoded queries, Low Search will try and add the GET vars to the pagination URLs automatically. If that fails, you can always add the query string manually, by using this as your pagination links:

<a href="{pagination_url}{low_search_query_string}">
0

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.