@Component(value="blAddSortLinkProcessor")
@ConditionalOnTemplating
public class AddSortLinkProcessor
extends org.broadleafcommerce.presentation.dialect.AbstractBroadleafAttributeModifierProcessor
A Thymeleaf processor that generates a search query href that will reflect the current search criteria in addition to the requested sort string
This is intended to be used in an anchor tag:
<a blc:addsortlink="price">Sort By Price</a>
Produces:
<a class="asc" href="http://mysite.com/category?sort=price+asc">Sort By Price</a>
This sort link can then be picked up by the BroadleafCategoryController to actually translate search queries based
on that query parameter. If there is no sort active on the request then this will print out a link to sort ascending.
Otherwise the link will output the non-active sort (so that you can switch between them).
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowMultipleSorts |
| Constructor and Description |
|---|
AddSortLinkProcessor() |
| Modifier and Type | Method and Description |
|---|---|
org.broadleafcommerce.presentation.model.BroadleafAttributeModifier |
getModifiedAttributes(String tagName,
Map<String,String> tagAttributes,
String attributeName,
String attributeValue,
org.broadleafcommerce.presentation.model.BroadleafTemplateContext context) |
String |
getName() |
int |
getPrecedence() |
public String getName()
public int getPrecedence()
getPrecedence in interface org.broadleafcommerce.presentation.dialect.BroadleafProcessorgetPrecedence in class org.broadleafcommerce.presentation.dialect.AbstractBroadleafAttributeModifierProcessorCopyright © 2023. All rights reserved.