Documentation
Enhanced Component Parameters
L&D Tool now supports new types of parameters in Components as Image element, Post element, and Cropped Image URL.
To improve efficiency and consistency when working with images in components, we introduced enhanced support for attribute sets as parameters, along with new parameter types: Post Element, Image Element, and Cropped Image URL. These enhancements simplify the integration of image elements within components.
As an example, using the <image> element inside a component was difficult and time-consuming. Each <image> field required its parameter, and all parameters supported only text values. This meant that image URLs had to be manually pasted, often retrieved from a media library or external source.
New Parameter Types
Three new parameter types have been added, and each of these supports an attribute set as a field, enabling a more structured way of handling components.
- Cropped Image URL
- Post Element
- Image Element
Using Post Element and Image Element params
You can now add actual elements directly to component templates and apply the {{param_name}} in the Attribute Sets field of the respective element.
Post Element Param
1. Post Element params can be added to the Attribute Set field of a <posts> element:
Image Element Params
2. Image Element params can be added to the Attribute Set field of a <image> element:
Adding Post Element and Image Element Params on other Layouts
When using thecomponent in any other page, the Post Element and Image Element params are going to appear as a UI element that allows the user to add attributes of a Post or an Image element.
Just click on the + Attribute button within the param to set the value of any of the available fields for the selected element.
Post Attributes
Using Cropped Image URL param
This allows you to select an image from the Library, and allows you to crop it if you want:
Image URL
Within the component, you will get the URL of the image passed to the component, which you can use in any element. For example:
Comments Moderation Tools