Created
August 21, 2012 18:53
-
-
Save kmgdevelopment/3418311 to your computer and use it in GitHub Desktop.
Low Search w/ Category Pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:low_search:results query="{segment_3}" status="not closed" limit="10" disable="member_data"} | |
{if count == 1} | |
<h3>Your search for <strong>"{low_search_keywords}"</strong> returned <strong>{absolute_results}</strong> results:</h3> | |
{/if} | |
{if low_search_collection_name == "resources"} | |
{categories} | |
<div class="entry"> | |
<h2><a href="{path='resources/category'}/{category_url_title}">{title}</a></h2> | |
<p>{low_search_excerpt}<br /> | |
<a href="{path='resources/category'}/{category_url_title}">{path='resources/category'}/{category_url_title}</a></p> | |
</div> | |
{/categories} | |
{if:else} | |
<div class="entry"> | |
<h2><a href="{page_url}">{title}</a></h2> | |
<p>{low_search_excerpt}<br /> | |
<a href="{page_url}">{page_url}</a></p> | |
</div> | |
{/if} | |
{paginate} | |
<p>Page {current_page} of {total_pages} pages {pagination_links}</p> | |
{/paginate} | |
{if no_results} | |
<p> | |
Sorry, your query did not return any results. | |
Check your spelling or try a different search term. | |
</p> | |
{/if} | |
{/exp:low_search:results} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment