org.broadleafcommerce.cms.web.processor
Class ContentProcessor
java.lang.Object
org.thymeleaf.processor.AbstractProcessor
org.thymeleaf.processor.element.AbstractElementProcessor
org.broadleafcommerce.common.web.dialect.AbstractModelVariableModifierProcessor
org.broadleafcommerce.cms.web.processor.ContentProcessor
- All Implemented Interfaces:
- Comparable<org.thymeleaf.processor.IProcessor>, org.thymeleaf.processor.IProcessor
public class ContentProcessor
- extends AbstractModelVariableModifierProcessor
Processor used to display structured content that is maintained with the Broadleaf CMS.
Usage based on the following attributes:
- contentType (required) - specifies the content you are retrieving
- contentName - if included will retrieve only content that matches the name. When no name is specified,
all matching content items of the passed in type are retrieved.
- maxResults - if specified limits the results to a specified number of items. The content will be returned
according to priority. If content items share the same priority, then they will be returned
randomly. Consider the example with 5 matching items with priorities (1,2,3,3,3) respectively. If
the count is set to 3. Items 1 and 2 will ALWAYS be returned. The third item returned will
randomy rotate through the 3rd, 4th, and 5th item.
- contentListVar - allows you to specify an alternate name for the list of content results. By default,
the results are returned in the page attributed "contentList"
- contentItemVar - since a typical usage is to only return one item, the first item is returned in the
variable "contentItem". This variable can be used to change the attribute name.
- numResultsVar - variable holding the returns the number of results being returned to through the tag-lib.
defaults to "numResults".
|
Constructor Summary |
ContentProcessor()
Sets the name of this processor to be used in Thymeleaf template |
| Methods inherited from class org.thymeleaf.processor.element.AbstractElementProcessor |
doProcess, getMatcher |
| Methods inherited from class org.thymeleaf.processor.AbstractProcessor |
compareTo, getMessage, getMessageForProcessor, getMessageForTemplate, process |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REQUEST_DTO
public static final String REQUEST_DTO
- See Also:
- Constant Field Values
BLC_RULE_MAP_PARAM
public static final String BLC_RULE_MAP_PARAM
- See Also:
- Constant Field Values
ContentProcessor
public ContentProcessor()
- Sets the name of this processor to be used in Thymeleaf template
getPrecedence
public int getPrecedence()
- Specified by:
getPrecedence in class org.thymeleaf.processor.AbstractProcessor
modifyModelAttributes
protected void modifyModelAttributes(org.thymeleaf.Arguments arguments,
org.thymeleaf.dom.Element element)
- Specified by:
modifyModelAttributes in class AbstractModelVariableModifierProcessor
initServices
protected void initServices(org.thymeleaf.Arguments arguments)
isSecure
public boolean isSecure(javax.servlet.http.HttpServletRequest request)
Copyright © 2013. All Rights Reserved.