@Frank
I think your solution would stop resizing every image below 215px width. But I 
only need that for a certain case.

@David
I may need to take a look at it.

For now I've implemented it as follows. In my OwnInternalTeaserModel I 
overwrote the getImage() method of the InternalTeaserModel.

[code]@Override
    public Asset getImage() {
        Asset image = STKUtil.getAsset(content, getImageName());
        String imageLocation = NodeDataUtil.getString(content, "imageLocation", 
"");

        if (image == null) {
            Content target = getTarget();
            image = findImage(target);
        }
        if (image != null) {
            if(image.getWidth() < 215 && imageLocation.equals("below")) {
                return image;
            } else {
                return STKUtil.getAssetVariation(image, 
getImageVariationName());
            }
        }
        return null;
    }[/code]

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=b554b680-ca9b-4d39-b506-fd63be74b976


----------------------------------------------------------------
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]>
----------------------------------------------------------------

  • [magnolia-user] I... Magnolia Forums (on behalf of Christian Balaguer Jehle)
    • [magnolia-use... Magnolia Forums (on behalf of David Long)
    • [magnolia-use... Magnolia Forums (on behalf of Frank Sommer)
    • [magnolia-use... Magnolia Forums (on behalf of Christian Balaguer Jehle)
    • [magnolia-use... Magnolia Forums (on behalf of Christian Balaguer Jehle)

Reply via email to