Default Search

A default search will allow for a way of doing a global basic search. This will search Product Name, Product Description, Page Name and Page Content. Below is some sample code on calling the search.

This search does not search attributes

Example Form:

{% form search %}
<input type="submit" value="Search">
{% endform %}
Output Tag Description
{content_type} Returns “product” or “page”
Product Output Tags See Product Loop Documentation
Page Output Tags See Page Loop Documentation

Attributes are not available on the default search loop.

Example Result Loop:

{% pagination result(10) %}
{% loop result %}
<div class="six columns">
{% if result.content_type == 'page' %}
	<h3><a href="{result.page_url}">{result.page_name}</a></h3>
	<p>{result.page_description_10}</p>
	<a href="{result.page_url}">Read More »</a>
{% else %}
	<div class="product-image">
    		<a href="{result.product_url}">{result.product_image_icon}</a>
	</div>
	<h3><a href="{result.product_url}">{result.product_name}</a></h3>
	<p>{result.product_description_10}</p>
	<a href="{result.product_url}">View Product »</a>
{% endif %}
</div>
{% endloop %}
<div class="pagination-container">
<div class="left">
	<p>Results {pagination_current_offset_start} - {pagination_current_offset_end} of {pagination_total_items}</p>
</div>
<div class="right">
	<p>Page {pagination_current_page} of {pagination_total_pages}</p>
</div>
{% default_pagination("Prev", "Next", 5) %}
</div>

Start your free, no-risk trial today.