Returns a link
from the URI stored in the provided OpenCms user context
to the VFS resource indicated by the given
link
and
siteRoot
,
for use on web pages.
The result should be an absolute link that contains 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.
In case link
is a relative URI, the current URI contained in the provided
OpenCms user context cms
is normally used to make the relative link
absolute.
The provided siteRoot
is assumed to be the "home" of the link.
In case the current site of the given OpenCms user context cms
is different from the
provided siteRoot
, the full server prefix is appended to the result link.
A server prefix is also added if
- the link is contained in a normal document and the link references a secure document
- the link is contained in a secure document and the link references a normal document
Please note the above text describes the default behavior as implemented by
CmsDefaultLinkSubstitutionHandler, which can be fully customized using this handler interface.