info.magnolia.module.templatingkit.templates
Class RedirectTemplateModel
java.lang.Object
info.magnolia.rendering.model.RenderingModelImpl<RD>
info.magnolia.module.templatingkit.templates.AbstractSTKTemplateModel<RD>
info.magnolia.module.templatingkit.templates.pages.STKPageModel<STKPage>
info.magnolia.module.templatingkit.templates.RedirectTemplateModel
- All Implemented Interfaces:
- STKRenderingModel<STKPage>, info.magnolia.rendering.model.RenderingModel<STKPage>
public class RedirectTemplateModel
- extends STKPageModel<STKPage>
Model of the Redirect Template. 3 Redirect mode are available (depending of
the 'path' value)
- Empty path: This will redirect to the first child page found. This is useful to directly display a page defined in a second or third level of a redirect tree
- Internal page link: Redirect directly to the selected page
- External page link: Redirect directly to the external page
If the redirect is define (not empty path) the rendering is skipped avoiding
the writing of the response (not allowed for response.redirect instruction).
Fields inherited from class info.magnolia.rendering.model.RenderingModelImpl |
content, contentMap, definition, parentModel |
Fields inherited from interface info.magnolia.rendering.model.RenderingModel |
SKIP_RENDERING |
Constructor Summary |
RedirectTemplateModel(javax.jcr.Node content,
STKPage definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
STKTemplatingFunctions stkFunctions,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions,
info.magnolia.dam.templating.functions.DamTemplatingFunctions damTemplatingFunctions)
|
Methods inherited from class info.magnolia.module.templatingkit.templates.pages.STKPageModel |
getBadgeWithoutTags, getBodyClass, getCategories, getCategoryLink, getContentNavigation, getImageLink, getImageModel, getLogoImageLink, getNavigation, getPrintLogoImageLink, resolveSectionPage |
Methods inherited from class info.magnolia.rendering.model.RenderingModelImpl |
getContent, getDef, getDefinition, getNode, getParent, getRoot |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.magnolia.rendering.model.RenderingModel |
getContent, getDefinition, getNode, getParent, getRoot |
PATH_PROPERTY_NAME
protected static final String PATH_PROPERTY_NAME
- See Also:
- Constant Field Values
HIDE_IN_NAV_PROPERTY_NAME
protected static final String HIDE_IN_NAV_PROPERTY_NAME
- See Also:
- Constant Field Values
HIDE_IN_NAV_DEFAULT_VALUE
protected static final boolean HIDE_IN_NAV_DEFAULT_VALUE
- See Also:
- Constant Field Values
RedirectTemplateModel
@Inject
public RedirectTemplateModel(javax.jcr.Node content,
STKPage definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
STKTemplatingFunctions stkFunctions,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions,
info.magnolia.dam.templating.functions.DamTemplatingFunctions damTemplatingFunctions)
execute
public String execute()
- Specified by:
execute
in interface info.magnolia.rendering.model.RenderingModel<STKPage>
- Overrides:
execute
in class info.magnolia.rendering.model.RenderingModelImpl<STKPage>
setDefaultHideInNavValueIfNotExisting
protected void setDefaultHideInNavValueIfNotExisting()
getRedirectPathToInternalContent
protected String getRedirectPathToInternalContent(String path)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getRedirectPathToFirstChild
public String getRedirectPathToFirstChild()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
hasPathDefined
protected boolean hasPathDefined()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
isInternalPath
public boolean isInternalPath(String url)
Copyright © 2008-2014 Magnolia International Ltd.. All Rights Reserved.