Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-968

External Page Teaser does not render its image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.4
    • 2.0.3
    • paragraphs
    • None

      First create External Page Teaser:

      • open the page demo-project / about
      • in Extra, add a new component External Page Teaser
      • add an URL and in the tab TeaserOverwrite add an image
      • save

      You must see that only the url is displayed not the image.

      Why?
      First:

      • open the associated flt /templating-kit/components/teasers/externalPage.ftl
      • open the modelClass info.magnolia.module.templatingkit.templates.components.ExternalTeaserModel

      You will find in the ftl these lines:

      [#if !hideTeaserImage]
          [#assign imageLink = (model.image!).link!]
      [/#if]
      

      You can try to find in the modelClass the method getImage(), but you wont find it...

      Solution:

      • add a method getImage to the model
      • or maybe it is more easy if the model extends info.magnolia.module.templatingkit.templates.components.ImageModel

        Acceptance criteria

              rsiska Robert Šiška
              sschmitt Samuel Schmitt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: