Class CmsTemplateMapper


  • public final class CmsTemplateMapper
    extends java.lang.Object
    Responsible for mapping formatters, containers and settings to different formatters, containers and settings according to the configuration file /system/config/template-mapping.xml.

    • Field Detail

      • m_enabled

        protected boolean m_enabled
        Flag which controls whether this is enabled.
      • m_configPath

        protected java.lang.String m_configPath
        The path to the mapper configuration.
    • Constructor Detail

      • CmsTemplateMapper

        public CmsTemplateMapper​(java.lang.String configPath)
        Creates a new instance.

        Parameters:
        configPath - the template mapper configuration VFS path
    • Method Detail

      • get

        public static CmsTemplateMapper get​(javax.servlet.ServletRequest request)
        Gets the template mapper for the current request.

        Parameters:
        request - the current request
        Returns:
        the template mapper
      • getTemplateMapperConfig

        public static java.lang.String getTemplateMapperConfig​(javax.servlet.ServletRequest request)
        Checks if the selected template context is "templatemapper".
        Parameters:
        request - the current request
        Returns:
        true if the selected template context is "templatemapper"
      • setForSave

        public void setForSave​(boolean forSave)
        Sets the for-save mode.

        Parameters:
        forSave - true if for-save mode should be enabled