code: public static boolean isContainerPage(CmsResource resource) {
  
          boolean result = false;
          if (resource != null) {
              result = (resource.getTypeId() == getContainerPageTypeIdSafely())
                  || (OpenCms.getResourceManager().getResourceType(resource) instanceof CmsResourceTypeXmlContainerPage);
          }
  
          return result;
  
      }
docs: Returns <code>true</code> in case the given resource is a container page.<p>
  
  Internally this checks if the type id for the given resource is
  identical type id of the container page.<p>
  
  @param resource the resource to check
  
  @return <code>true</code> in case the given resource is a container page