docs: public static boolean updateModelGroupResource(CmsObject cms, CmsResource group, String baseContainerName) {
  
          if (!isModelGroupResource(group)) {
              // skip resources that are no model group
              return false;
          }
          try {
              CmsXmlContainerPage xmlContainerPage = CmsXmlContainerPageFactory.unmarshal(cms, group);
              CmsContainerPageBean pageBean = xmlContainerPage.getContainerPage(cms);
  
              CmsContainerBean baseContainer = pageBean.getContainers().get(MODEL_GROUP_BASE_CONTAINER);
              boolean changedContent = false;
              if ((baseContainer != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(baseContainerName)) {
  
                  List<CmsContainerBean> containers = new ArrayList<CmsContainerBean>();
                  for (CmsContainerBean container : pageBean.getContainers().values()) {
                      if (container.getName().equals(MODEL_GROUP_BASE_CONTAINER)) {
                          CmsContainerBean replacer = new CmsContainerBean(
                              baseContainerName,
                              container.getType(),
                              container.getParentInstanceId(),
                              container.isRootContainer(),
                              container.getElements());
                          containers.add(replacer);
                          changedContent = true;
                      } else {
                          containers.add(container);
                      }
                  }
                  if (changedContent) {
                      pageBean = new CmsContainerPageBean(containers);
                  }
              }
              if (changedContent) {
                  ensureLock(cms, group);
  
                  if (changedContent) {
                      xmlContainerPage.save(cms, pageBean);
                  }
                  if (group.getName().endsWith(".xml")) {
                      // renaming model groups so they will be rendered correctly by the browser
                      String targetPath = cms.getSitePath(group);
                      targetPath = targetPath.substring(0, targetPath.length() - 4) + ".html";
                      cms.renameResource(cms.getSitePath(group), targetPath);
                      group = cms.readResource(group.getStructureId());
                  }
                  tryUnlock(cms, group);
                  return true;
              }
              return false;
  
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
              return false;
          }
  
      }