[MGNLSTK-968] External Page Teaser does not render its image Created: 11/Jun/12  Updated: 19/Jul/12  Resolved: 18/Jun/12

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: paragraphs
Affects Version/s: 2.0.3
Fix Version/s: 2.0.4

Type: Bug Priority: Major
Reporter: Samuel Schmitt Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

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


 Comments   
Comment by Robert Šiška [ 15/Jun/12 ]

Or even simpler, extend AbstractTeaserModel. There doesn't seem to be reason for extending AbstractSTKTemplateModel.

Comment by Christian Ringele [ 18/Jun/12 ]

Implementation looks fine, closing ticket

Generated at Mon Feb 12 07:32:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.