CategorySearch
Extends Search. CategorySearch replaces the default Search algorithm with a more specific product category search. Currently the CategorySearch object has limited functionality.
CategorySearch
is not instantiated automatically. You can create a new instance anywhere within
a layout, template or included partial.
<?ev
var categorySearch = new CategorySearch();
categorySearch.featured().limit(10);
for (var category of categorySearch) {
// do something
}
?>
Methods |
---|
featured([isFeatured])
CategorySearch
Filter search results to include/exclude featured categories.
Parameters
Example
|
orderBy(sortString)
CategorySearch
Sets the order and direction of the search.
Returns the original Search object allowing for method chaining. |
withIds(idArray)
CategorySearch
Limit search results to Categories with an ID matching any within the supplied array. Parameters
Example
|