code: public String substituteLink(CmsObject cms, CmsResource resource) {
  
          return substituteLinkForRootPath(cms, resource.getRootPath());
      }
docs: Returns a link <i>from</i> the URI stored in the provided OpenCms user context
  <i>to</i> the given VFS resource, for use on web pages.<p>
  
  The result will contain the configured context path and
  servlet name, and in the case of the "online" project it will also be rewritten according to
  to the configured static export settings.<p>
  
  Should the current site of the given OpenCms user context <code>cms</code> be different from the
  site root of the given resource, the result will contain the full server URL to the target resource.<p>
  
  Please note the above text describes the default behavior as implemented by
  {@link CmsDefaultLinkSubstitutionHandler}, which can be fully customized using the
  {@link I_CmsLinkSubstitutionHandler} interface.<p>
  
  @param cms the current OpenCms user context
  @param resource the VFS resource the link should point to
  
  @return a link <i>from</i> the URI stored in the provided OpenCms user context
  <i>to</i> the given VFS resource, for use on web pages