2.1.16. Icon component
With the Icon Component you can add e.g. your shop USPs on CMS pages, category pages or product detail pages.
Ā
When setting up the component you firstly have to select a TEASER WIDTH, DESKTOP, TABLET LAYOUT, MOBILE LAYOUT and the TEXT POSITIONING.
Ā
CONTENT WIDTH: The image teaser area is limited by the container width.
Ā
MOBILE LAYOUT: On mobile devices only two icons will be displayed. There is a slider functionality which allows rotation of further icon images.
Ā
The TEXT POSITIONING: BELOW IMAGE will display your text underneath icon images.
Ā
DESKTOP LAYOUT AND TABLET LAYOUT provides different number of images per row:
Ā
Ā·Ā Ā Ā Ā Ā Ā 5 IN A ROW: Four image teaser per row will be displayed in the image teaser area. In case more image teasers are included in the component they can be accessed using the slider functionality.
Ā·Ā Ā Ā Ā Ā Ā 6 IN A ROW: Six image teaser per row will be displayed in the image teaser area. In case more image teasers are included in the component they can be accessed using the slider functionality.
Ā·Ā Ā Ā Ā Ā Ā 7 IN A ROW: Eight image teaser per row will be displayed in the image teaser area. In case more image teasers are included in the component they can be accessed using the slider functionality.
Ā·Ā Ā Ā Ā Ā Ā 8 IN A ROW: Eight image teaser per row will be displayed in the image teaser area. In case more image teasers are included in the component they can be accessed using the slider functionality.
Ā
The MOBILE LAYOUT is fixed to āSLIDERā and TEXT POSITIONING is fixed to āTEXT BELOW IMAGEā.
Ā
In the next step you can add icons the same way as image teasers. By clicking the ā+ā icon new images will be added. You may configure your icon images in the CONTENT area. Here following settings can be made:
In the image upload area on the left-hand side you can insert an image using the Magento 2 media explorer. [1] If you already have an image, you can remove it using the ābinā icon. If you have more than one image teaser (added using the the ā+ā icon) you can move the given image using the āarrow upā and āarrow downā icons. Also by clicking āchangeā you can change an existing image. Regardless whether you have chosen an image or not there always will be shown a live preview with your slogan and description.
Enter the SLOGAN text which will be the most prominent text element on the image teaser (depending on the styling). Additionally it is possible to insert dynamic content in this text area and any other textfield component, e.g. HEADLINE and DESCRIPTION using Content Constructor Directives. By adding directives it will display your productsā price or a productsā discount percentage to your desired text field.
Fetching a productsā price can be done with this directive:
{{price sku=āyour_product_skuā withCurrency=ātrueā}}
When choosing āfalseā as your parameter there is no currency sign displayed.If you wish to display a discount percentage of a certain product use following directive:
{{discountPercentage sku=āyour_product_skuā}}However only an integer value will be shown.
Enter the DESCRIPTION text which will be the text element located underneath the slogan on the image teaser (depending on the styling). Also Constructor Directives can be used here.
Enter a CTA LABEL text in case you want to include a CTA button on the image teaser.
Enter a URL in the CTA TARGET LINK input in case you want to add a link to the CTA button (also the Magento 2 widget types CMS Page Link, Catalog Category Link, Category Product Link, File URL are supported).
Ā
In the tab STYLE two additional customizations can be made.
Ā
Choosing TEXT STYLE ālightā provides a black box with white font. If ādarkā is selected it is the other way around, providing a black text font on a white background. Both coloring changes are in each case applied to slogan and description.
MIRROR IMAGE can be toggled on or off. This feature gives the possibility to flip your image horizontally.
Ā
Ā
Ā
When the changes are done click āSAVEā on the right-hand side in the top area.
[1] It is recommended to use JPG and PNG (RGB format) file types for images