[MTE-48] Image Component Created: 08/Oct/15  Updated: 15/Apr/16  Resolved: 19/Feb/16

Status: Closed
Project: Magnolia Templating Essentials
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.9

Type: Story Priority: Major
Reporter: Christopher Zimmermann Assignee: Christoph Meier
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 7h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Date of First Response:
Epic Link: LD: components + pages
Sprint: Basel 31
Story Points: 3

 Description   

A component to add an Image with optional credit and caption.

The Image component should work the same as the image in the textImage component.
The dialog should be roughly equivalent to the image tab of the textImage dialog:

name label description
image Image Select or upload an image to display.
imageAltText Image alt text Alternative text explaining the contents of the image. Used in screen readers and when image cannot be displayed. If left blank, the title of the image asset will be used.
imageTitle Image title Image title is displayed on mouse hover. If left blank, Image alt text will be used.
imageCaption Caption A caption to display with the image. If left blank, the caption of the image asset will be used if it exists, otherwise no caption will be displayed.
imageCredit Credit A credit to display with the image, such as a copyright notice or a source. If left blank, the copyright of the image asset will be used if it exists, otherwise no credit will be displayed.

TemplateScript:
The image and textImage components should use the same image macro.

The template script must behave as described in the above descriptions.

Like with the textImage, if there are no copyright or credit - then just an img tag should be created. If a copyright or credit exists, they should be included in span tags - and the img and span tags should be within an additional div tag.

Parameters:
Template definition parameters exist to allow developer to configure extra css classes to be used in the template script.
imageWrapperClass
imageClass



 Comments   
Comment by Philip Mundt [ 29/Oct/15 ]

Please also remove the model class associated with the component.

Comment by Christoph Meier [ 16/Feb/16 ]

New component image was created and also added to the page template basic as available component.

The component is reusing both macros/image.ftl and includes/init.ftl.

dialogs/components/image defines basically a subset of the parameters used in the existing textImage component.

Possible definition params are: divClass, imageWrapperClass and imgClass.
Def. param imgClass is new (compared to textImage), this gives some bits of more flexibility.
((I was tempted to introduce imgClass in the textImage component too, but at the end i was not adding it to textImage, the situation there is a bit more complex because of the "positioning" of the image.))

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