code: public static CmsResourceInfo createSitemapResourceInfo(CmsResource resource, CmsSite baseSite) {
  
          String title = resource.getName();
          String path = resource.getRootPath();
  
          CmsResourceInfo info = new CmsResourceInfo();
          CmsResourceUtil resUtil = new CmsResourceUtil(A_CmsUI.getCmsObject(), resource);
  
          CmsObject cms = A_CmsUI.getCmsObject();
          try {
              Map<String, CmsProperty> props = CmsProperty.toObjectMap(cms.readPropertyObjects(resource, false));
              CmsProperty navtextProp = props.get(CmsPropertyDefinition.PROPERTY_NAVTEXT);
              CmsProperty titleProp = props.get(CmsPropertyDefinition.PROPERTY_TITLE);
  
              if ((navtextProp != null) && (navtextProp.getValue() != null)) {
                  title = navtextProp.getValue();
              } else if ((titleProp != null) && (titleProp.getValue() != null)) {
                  title = titleProp.getValue();
              }
          } catch (Exception e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
          info.getTopLine().setValue(title);
          if (baseSite != null) {
              String siteRoot = baseSite.getSiteRoot();
              if (path.startsWith(siteRoot)) {
                  path = path.substring(siteRoot.length());
                  path = CmsStringUtil.joinPaths("/", path);
              }
          }
          info.getBottomLine().setValue(path);
          Resource icon = CmsResourceIcon.getSitemapResourceIcon(
              A_CmsUI.getCmsObject(),
              resUtil.getResource(),
              IconMode.localeCompare);
          info.getResourceIcon().initContent(resUtil, icon, null, true, false);
          return info;
      }
docs: Creates a resource info widget for a resource that looks like the sitemap entry for that resource.<p>
  
  @param resource the resource
  @param baseSite the base site
  
  @return the resource info widget