Hi,
I am looking to create dummy resource with a resourceType (text), valuemap properties and not to create any real jcr data/nodes.
In sightly html get the dummy resource using "data-sly-resource" tag and render it.
Thanks for all the help.
Usecase: retrieve content fragments elements and have it as accordion item panel title, child text component.
Thanks,
Sri
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @sreenu539 ,
Yes we can use it via Sling. Sling model can be used to define such resource and its appropriate properties and it can be used by HTL for rendering.
Hi @sreenu539 ,
In order to use "data-sly-resource", it requires a physical location of the node.
But you can achieve this in a different way using AemContext api.
for the mentioned use case, why can't you simple get the resource of your content fragment an iterate through the configured properties?
Hi @sreenu539 ,
Yes we can use it via Sling. Sling model can be used to define such resource and its appropriate properties and it can be used by HTL for rendering.
Does this create an actual resource ?
no, its synthetic. it wont create any node under content.
Views
Likes
Replies
Views
Likes
Replies