docs: public Map<String, CmsClientTemplateBean> getTemplates() throws CmsException {
  
          Map<String, CmsClientTemplateBean> result = new HashMap<String, CmsClientTemplateBean>();
          CmsObject cms = getCmsObject();
  
          // find current site templates
          int templateId = OpenCms.getResourceManager().getResourceType(
              CmsResourceTypeJsp.getContainerPageTemplateTypeName()).getTypeId();
          List<CmsResource> templates = cms.readResources(
              "/",
              CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireType(templateId),
              true);
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(cms.getRequestContext().getSiteRoot())) {
              // if not in the root site, also add template under /system/
              templates.addAll(
                  cms.readResources(
                      CmsWorkplace.VFS_PATH_SYSTEM,
                      CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireType(templateId),
                      true));
          }
          // convert resources to template beans
          for (CmsResource template : templates) {
              CmsClientTemplateBean templateBean = getTemplateBean(cms, template);
              result.put(templateBean.getSitePath(), templateBean);
          }
          return result;
      }