[
http://jira.magnolia-cms.com/browse/MGNLSTK-983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Samuel Schmitt updated MGNLSTK-983:
-----------------------------------
Description:
An internal teaser must returns the first image found in the target content
pointed by the teaser if no teaser image was defined in target intro/header.
This is what the javadoc of
{{info.magnolia.module.templatingkit.templates.components.InternalTeaserModel.findImage(Node)}}
says.
The problem with the implementation of {{InternalTeaserModel.findImage}} is
that when no teaser image is defined in the intro/header of the target, the
first image found could come from a child page. And according the usage of an
internal teaser, we expect that the image comes from an area of the target.
{{InternalTeaserModel.findImage}} must first search in the areas of the target
before searching in the subpages.
*How to reproduce*
* Create a page, add a text/Image with an image.
* Create a sub page with an intro image.
* On a third page, create a teaser where the target is the first page you
created.
* The teaser displays the image from the subpage and not from the text/image of
the 1st page.
*Possible fix*
In my project, I override {{InternalTeaserModel.findImage}} and I sort the list
of nodes in order to the areas are the first in the list.
was:
An internal teaser must returns the first image found in the target content
pointed by the teaser if no teaser image was defined in target intro/header.
This is what the javadoc of
{{info.magnolia.module.templatingkit.templates.components.InternalTeaserModel.findImage(Node)}}
says.
The problem with the implementation of {{InternalTeaserModel.findImage}} is
that when no teaser image is defined in the intro/header of the target, the
first image found could come from a child page. And according the usage of an
internal teaser, we expect that the image comes from an area of the target.
{{InternalTeaserModel.findImage}} must first search in the areas of the target
before searching in the subpages.
> Internal Teaser returns an image from a children of the target page, when the
> target has no image in its intro / header but has images in the main content.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MGNLSTK-983
> URL: http://jira.magnolia-cms.com/browse/MGNLSTK-983
> Project: Magnolia Standard Templating Kit
> Issue Type: Bug
> Components: templates
> Affects Versions: 2.0.3
> Reporter: Samuel Schmitt
> Fix For: 2.0.x
>
>
> An internal teaser must returns the first image found in the target content
> pointed by the teaser if no teaser image was defined in target intro/header.
> This is what the javadoc of
> {{info.magnolia.module.templatingkit.templates.components.InternalTeaserModel.findImage(Node)}}
> says.
> The problem with the implementation of {{InternalTeaserModel.findImage}} is
> that when no teaser image is defined in the intro/header of the target, the
> first image found could come from a child page. And according the usage of an
> internal teaser, we expect that the image comes from an area of the target.
> {{InternalTeaserModel.findImage}} must first search in the areas of the
> target before searching in the subpages.
> *How to reproduce*
> * Create a page, add a text/Image with an image.
> * Create a sub page with an intro image.
> * On a third page, create a teaser where the target is the first page you
> created.
> * The teaser displays the image from the subpage and not from the text/image
> of the 1st page.
> *Possible fix*
> In my project, I override {{InternalTeaserModel.findImage}} and I sort the
> list of nodes in order to the areas are the first in the list.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------