I have a component with 3 RTE, and they are stored as
{
"jcr:primaryType": "nt:unstructured",
"header": "bg",
"jcr:lastModifiedBy": "admin",
"C_background_reasons-to-buy": "<p>Reasons to buy</p>\r\n",
"jcr:lastModified": "Wed Apr 24 2024 10:15:09 GMT+0200",
"sling:resourceType": "org/components/somecomponent",
"textIsRich": [
"true",
"true"
"true"
],
"B_background_random-proposition": "<p>Random proposition</p>\r\n",
"A_background_collection-concept-story": "<p>Collection Concept Story</p>\r\n"
}
I am trying to read 3 properties (starting with A_, B_ & C_ ) and I use sightly to iterate and have some condition..
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @anupampat ,
As per my knowledge there is no such property/feature available on Sightly.
To achieve your scenario, create a sling model for the component and try to make the sorting be done in the backend.
Views
Replies
Total Likes
I would recommend to use Multifield if your requirement permits. Otherwise, you can create a list and add items as the order you want to the Sling Model as @sravs suggested.
Views
Replies
Total Likes
Hi @anupampat
I think if you use sling model instead of calling properties directly to sightly, you can resolve the resource and get the valueMap of the resource. Then you will get all the values in a sorted order by the property names. And then you can return this map. You can give a try with this approach.
Thanks,
Asif Ahmed
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies