Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1053

Make sure that the HstLinkCreator interface also has a method for creating links when there is no current context

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.04.06
    • 2.04.07
    • 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);

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: