code: private List<CmsResource> getDetailContainerResources(CmsObject cms, CmsResource res) throws CmsException {
  
          CmsRelationFilter filter = CmsRelationFilter.relationsFromStructureId(res.getStructureId()).filterType(
              CmsRelationType.DETAIL_ONLY);
          List<CmsResource> result = Lists.newArrayList();
          List<CmsRelation> relations = cms.readRelations(filter);
          for (CmsRelation relation : relations) {
              try {
                  result.add(relation.getTarget(cms, CmsResourceFilter.ALL));
              } catch (Exception e) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
          return result;
      }
docs: Reads the detail container resources which are connected by relations to the given resource.
  
  @param cms the current CMS context
  @param res the detail content
  
  @return the list of detail only container resources
  
  @throws CmsException if something goes wrong