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

[Forward-port to v13] Head Contributions from another valve

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 13.0.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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: