code: public static String getTemplateMapperConfig(ServletRequest request) {
  
          String result = null;
          CmsTemplateContext templateContext = (CmsTemplateContext)request.getAttribute(
              CmsTemplateContextManager.ATTR_TEMPLATE_CONTEXT);
          if (templateContext != null) {
              I_CmsTemplateContextProvider provider = templateContext.getProvider();
              if (provider instanceof I_CmsTemplateMappingContextProvider) {
                  result = ((I_CmsTemplateMappingContextProvider)provider).getMappingConfigurationPath(
                      templateContext.getKey());
              }
          }
          return result;
      }
docs: Checks if the selected template context is "templatemapper".
  
  @param request the current request
  @return true if the selected template context is "templatemapper"