code: private CmsContainerElementBean getDetailFunctionElement(
          CmsObject cms,
          CmsResource detailFunctionPage,
          ServletRequest req) {
  
          try {
              CmsXmlContainerPage xmlContainerPage = CmsXmlContainerPageFactory.unmarshal(cms, detailFunctionPage, req);
  
              CmsContainerPageBean page = xmlContainerPage.getContainerPage(cms);
              CmsContainerBean container = page.getContainers().get(DETAIL_FUNCTION_CONTAINER_NAME);
              if (container == null) {
                  for (Entry<String, CmsContainerBean> entry : page.getContainers().entrySet()) {
                      if (entry.getKey().endsWith("-" + DETAIL_FUNCTION_CONTAINER_NAME)) {
                          container = entry.getValue();
                          break;
                      }
                  }
              }
              if (container != null) {
                  return container.getElements().get(0);
              }
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
          return null;
      }
docs: Returns the detail function element.<p>
  
  @param cms the cms context
  @param detailFunctionPage the detail function page
  @param req the current request
  
  @return the detail function element, if available