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

Head Contributions from another valve

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.5.0
    • None
    • None

    Description

      Head contribution is at the moment possible only from HstComponent code.
      However, sometimes we want to contribute some extra head contributed elements from another valve. For example, Pixel data layer object writing in a page could be done by an additional valve which is executed before AggregationValve and HstComponent executions.

      A possible solution is:

      • Introduce HeadContributable interface and HstRequestContext#setHeadContributable(String name, HeadContributable hc) and HstRequestContext#getHeadContributable(String name): HeadContributable.
      • HeadContributable has #contributeHeadElements(HstResponse) operation only.
      • A custom valve invokes HstRequestContext#setHeadContributable(String name, HeadContributable hc) with its own HeadContributable instance, which contributes both analytics tracker library and JSON data-layer object (e.g, pixel vars).
      • AggregationValve iterates HeadContributable map from HstRequestContext and invoke #contributeHeadElements() on root component's HstResponse.

      Attachments

        1. hc02.png
          hc02.png
          72 kB
        2. hc01.png
          hc01.png
          492 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: