code: protected boolean isDetailPage(CmsObject cms, CmsResource resource) {
  
          CmsResource folder;
          if (resource.isFile()) {
              if (!CmsResourceTypeXmlContainerPage.isContainerPage(resource)) {
                  return false;
              }
              try {
                  folder = getCms().readResource(CmsResource.getParentFolder(resource.getRootPath()));
              } catch (CmsException e) {
                  LOG.debug(e.getLocalizedMessage(), e);
                  return false;
              }
          } else {
              folder = resource;
          }
          List<CmsDetailPageInfo> allDetailPages = new ArrayList<CmsDetailPageInfo>();
          // First collect all detail page infos
          for (CmsADEConfigDataInternal configData : m_siteConfigurationsByPath.values()) {
              List<CmsDetailPageInfo> detailPageInfos = wrap(configData).getAllDetailPages();
              allDetailPages.addAll(detailPageInfos);
          }
          // First pass: check if the structure id or path directly match one of the configured detail pages.
          for (CmsDetailPageInfo info : allDetailPages) {
              if (folder.getStructureId().equals(info.getId())
                  || folder.getRootPath().equals(info.getUri())
                  || resource.getStructureId().equals(info.getId())
                  || resource.getRootPath().equals(info.getUri())) {
                  return true;
              }
          }
          // Second pass: configured detail pages may be actual container pages rather than folders
          String normalizedFolderRootPath = CmsStringUtil.joinPaths(folder.getRootPath(), "/");
          for (CmsDetailPageInfo info : allDetailPages) {
              String parentPath = CmsResource.getParentFolder(info.getUri());
              if (parentPath != null) {
                  String normalizedParentPath = CmsStringUtil.joinPaths(parentPath, "/");
                  if (normalizedParentPath.equals(normalizedFolderRootPath)) {
                      try {
                          CmsResource infoResource = getCms().readResource(info.getId());
                          if (infoResource.isFile()) {
                              return true;
                          }
                      } catch (CmsException e) {
                          LOG.warn(e.getLocalizedMessage(), e);
                      }
                  }
              }
          }
          return false;
      }
docs: Checks whether the given resource is configured as a detail page.<p>
  
  @param cms the current CMS context
  @param resource the resource to test
  
  @return true if the resource is configured as a detail page