|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Reimplementation, based on ItemTemplateResolver
Many sites offer alternative views of the same content item depending on device or browser, or on user preference. For example, a site may have "plain" and "fancy" versions of its pages. The fancy versions would be the defaults, while the plain versions would be appropriate for users with low-bandwidth connections, older browsers, or a distaste for flashy appurtenances. In this the case the selection might be made based on a cookie.
Another common example is the "printable" version of a page. In this case a query variable might be more appropriate.
Field Summary | |
static String |
versionId
|
Method Summary | |
String |
getTemplate(ContentSection section,
ContentItem item,
javax.servlet.http.HttpServletRequest request)
Returns the JSP template filename relative to the webapp root. |
String |
getTemplateContext(javax.servlet.http.HttpServletRequest request)
Gets the template context from the request. |
String |
getTemplatePath(Template template)
Returns the JSP template filename relative to the webapp root for a given Template reference. |
String |
getTemplateXSLPath(Template template)
Returns the XSL template filename relative to the webapp root for a given Template reference. |
void |
setTemplateContext(String sTemplateContext,
javax.servlet.http.HttpServletRequest request)
Sets the TemplateContext parameter in the request |
Field Detail |
public static final String versionId
Method Detail |
public String getTemplate(ContentSection section, ContentItem item, javax.servlet.http.HttpServletRequest request)
section
- The ContentSection for the requestitem
- The ContentItem for the requestrequest
- The current HttpServletRequest
public String getTemplatePath(Template template)
template
- The Template to resolve the URL for.
public String getTemplateXSLPath(Template template)
template
- The Template to resolve the URL for.
public void setTemplateContext(String sTemplateContext, javax.servlet.http.HttpServletRequest request)
sTemplateContext
- the template context to setrequest
- the request in which to set the template contextpublic String getTemplateContext(javax.servlet.http.HttpServletRequest request)
request
- the request from which to get the template context
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |