Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.04.06
-
None
-
None
Description
The HstLinkCreator should be able to do linkrewriting also without a ResolvedSiteMapItem representing the current context. This way, also, linkrewriting can be called without having actual HstProcessing, in other words, we can call the linkrewriting from outside the Hst request processing, for example from a filter which should be able to do a redirect.
Also, it should be in the future possible to do linkrewriting to subsites, where we do not know on beforehand which subsite is best suited to handle the link. Therefor, I'll add the following to methods to the HstLinkCreator:
/**
- Rewrite a jcr Node to a HstLink wrt the site HstSite
- @param node
- @param hstSite
- @return the HstLink for this jcr Node or <code>null</code>
*/
HstLink create(Node node, HstSite hstSite);
/**
- Rewrite a jcr Node to a HstLink wrt the the sites HstSites: the (sub)site to which the Node belongs is not known on beforehand
- @param node
- @param hstSites
- @return the HstLink for this jcr Node or <code>null</code>
*/
HstLink create(Node node, HstSites hstSites);