Created
November 11, 2013 22:13
-
-
Save objectivehtml/7421428 to your computer and use it in GitHub Desktop.
Channel Search - Search by Categories
This file contains 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
<h3>Categories</h3> | |
{exp:channel_search:form id="Category Search" method="post"} | |
<ul> | |
{categories} | |
<li><label><input type="checkbox" name="category[]" value="{category_url_title}" {checked} /> {category_name}</label></li> | |
{/categories} | |
</ul> | |
<button type="submit" class="button">Search</button> | |
{/exp:channel_search:form} | |
<hr> | |
<h3>Results</h3> | |
<div class="results"> | |
{exp:channel_search:results id="Category Search"} | |
{if no_results} | |
<p>No entries have been assigned to this category.</p> | |
{/if} | |
{if has_not_searched} | |
<p>You have not searched any categories yet.</p> | |
{/if} | |
{if has_searched} | |
{color_photo} | |
{/if} | |
{/exp:channel_search:results} | |
</div> | |
<style type="text/css"> | |
.results img { width: 200px; margin: 0 10px 10px 0; } | |
.results img:nth-child(3n) { clear: left; } | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment