EKM Tag: [ekm:filter_by]
This tag is used to output filtering controls for narrowing down a list of products. Product attributes are used to allow a customer to filter through all products on a category page.
- Tag Information
[ekm:filter_by][/ekm:filter_by]
[ekm:filter_by]
target_tag_id='some-element-id';
output_start='<div>';
output_attribute_start='<h2>[name]</h2><ul>';
output_attribute_item='<li>[input][name]</li>';
output_attribute_end='</ul>';
output_price='<h2>Price</h2>[min-input][max-input]';
output_end='<button>Filter</button></div>';
[/ekm:filter_by]
include_javascript='yes';
Define whether or not you wish to output Javascript to trigger the filtering of the showdata. ‘yes’ is the recommended setting but if you’d like to write your own javascript to do this you can disable the default actions.
include_css='yes';
Define whether or not you would like the default styling to output with this tag. We recommend only writing modifier CSS and not actually turning off the CSS.
include_price_widget='yes';
Define whether or not the price filter widget will display on the filter list. Including this attribute will overwrite the setting in the edit category modal.
target_tag_id='cat_products';
Define the showdata tag ID that will be filtered. If you do not use Javascript this attribute has no effect.
loading_img_url='/ekmps/shops/username/resources/design/loading.gif';
The URL of the loading image that is displayed during filtering.
output_start='<div class="filter-by">';
Define any HTML you wish to be output before the filtering options. This will only output if there are filter options to output.
output_attribute_start='<div class="filter-by-attribute">';
Define any HTML or Text you want to output before the filter attributes. Here you should output the name of the attribute.
output_attribute_item='<li>[input][name]</li>';
Define any HTML or Text you want to output after the filter attributes.
output_attribute_end='</div>';
Define any HTML or Text you want to output after the filter attributes.
output_price='<h2>Price</h2>[min-input][max-input]';
Define how you would like to output the price filter.
output_end='</div>';
Define any HTML you wish to be output after the filtering options.
change_callback='doChange';
Define a javascript function in global scope to be called when the filter has changed.
requeststart_callback='beginRequest';
Define a javascript function in global scope to be called when the filter has begun calling the new products.
requestend_callback='endRequest';
Define a javascript function in global scope to be called when the filter has finished calling the new products.