docs: private CmsContainerElementBean generateDetailViewElement(
          ServletRequest request,
          CmsObject cms,
          CmsResource detailContent,
          CmsContainerBean container) {
  
          CmsContainerElementBean element = null;
          if (detailContent != null) {
              // get the right formatter
  
              CmsADEConfigData config = OpenCms.getADEManager().lookupConfiguration(
                  cms,
                  cms.getRequestContext().getRootUri());
              CmsFormatterConfiguration formatters = config.getFormatters(cms, detailContent);
              I_CmsFormatterBean formatter = formatters.getDetailFormatter(getType(), getContainerWidth());
  
              if (formatter != null) {
                  // use structure id as the instance id to enable use of nested containers
                  Map<String, String> settings = new HashMap<String, String>();
                  if (!container.getElements().isEmpty()) {
                      // in case the first element in the container is of the same type as the detail content, transfer it's settings
                      CmsContainerElementBean el = container.getElements().get(0);
                      try {
                          el.initResource(cms);
                          if (el.getResource().getTypeId() == detailContent.getTypeId()) {
                              settings.putAll(el.getIndividualSettings());
                          }
                      } catch (CmsException e) {
                          LOG.error(e.getLocalizedMessage(), e);
                      }
                  }
  
                  String formatterKey = CmsFormatterConfig.getSettingsKeyForContainer(container.getName());
                  if (settings.containsKey(formatterKey)) {
                      String formatterConfigId = settings.get(formatterKey);
                      if (CmsUUID.isValidUUID(formatterConfigId)) {
                          I_CmsFormatterBean formatterBean = OpenCms.getADEManager().getCachedFormatters(
                              cms.getRequestContext().getCurrentProject().isOnlineProject()).getFormatters().get(
                                  new CmsUUID(formatterConfigId));
                          if (formatterBean != null) {
                              formatter = formatterBean;
                          }
                      }
                  }
                  settings.put(formatterKey, formatter.getId());
                  settings.put(CmsContainerElement.ELEMENT_INSTANCE_ID, new CmsUUID().toString());
                  // create element bean
                  element = new CmsContainerElementBean(
                      detailContent.getStructureId(),
                      formatter.getJspStructureId(),
                      settings,
                      false);
                  String pageRootPath = cms.getRequestContext().addSiteRoot(cms.getRequestContext().getUri());
                  element = CmsTemplateMapper.get(request).transformDetailElement(cms, element, pageRootPath);
              }
          }
          return element;
      }