docs: private String getTemplateName(CmsObject cms, CmsResource resource) throws CmsException {
  
          String templateName = (String)(m_templateNameCache.getCachedObject(cms, resource.getRootPath()));
          if (templateName == null) {
              CmsProperty nameProperty = cms.readPropertyObject(
                  resource,
                  CmsPropertyDefinition.PROPERTY_TEMPLATE_ELEMENTS,
                  false);
              String nameFromProperty = "";
              if (!nameProperty.isNullProperty()) {
                  nameFromProperty = nameProperty.getValue();
              }
              m_templateNameCache.putCachedObject(cms, resource.getRootPath(), nameFromProperty);
              return nameFromProperty;
          } else {
              return templateName;
          }
      }