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

Support to load different image variant variants in hst:html depending on CONTEXT

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.24.05, 2.25.04-alpha
    • None
    • None

    Description

      Developers can then depending on the context show small or large image : Thus, small image for mobile, medium for ipad, large for site
      Secondly, think about device detection: When low bandwidth detected, show low resolution, otherwise high

      I will do for this the following :

      1)

      Add a new hst-core.tld tag : <hst:imagevariant>

      This tag gets some parameters like:

      1) Which variant to use (for example myhipporpoject:thumbnail)
      2) Which variant to replace (for example myhippoproject:original ). If this property is missing, (1) is used for all variants
      3) fallback = true | false : If the variant to use does not exist, default back to the original one if true. Default fallback will be false

      This imagevariant element can only be placed within the hst:html tag as child tag

      2) Next to the ContentRewriter interface, I'll add the ImageVariantRewriter interface that at least contains:

      void setImageVariant(some image variant obj representing <hst:imagevariant> parameters)

      3) SimpleContentRewriter will also implement ImageVariantRewriter :

      Note that because I want to backport this feature, I do not want to add the setImageVariant method to the ContentRewriter API because custom projects might have implemented it themselves. Unless we assume they all extend the AbstractContentRewriter... I think that was the purpose of AbstractContentRewriter. If so, I could add the setImageVariant method to ContentRewriter and implement it in AbstractContentRewriter. That might be better...

      WDOT?

      Regards Ard

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: