HTL is ignoring the passed resource as param to Sling Model
Hi All,
I am trying to render an image from a multifield item using a Sling Model -
If I print the below in sightly here’s the result for it -
<p>RESOURCE is ${tableList}</p>RESOURCE is /content/projectA/en/home/jcr:content/root/responsivegrid_1161940076/banner_1463578421/customMultifield/item0
I try to pass this resource to a custom sling model like below -
<sly data-sly-use.slimItem="${'org.projA.web.core.models.customModel' @ resource=tableList}"></sly>
When I do the above and try to log it in the init function of sling model customModel, I get the below -
@PostConstructprotected void init() { LOG.error("RESOURCE PATH: {}", resource.getPath());}I get the following in the error log -
06.04.2026 23:22:43.593 *ERROR* [[0:0:0:0:0:0:0:1] [1775497963265] GET /content/projectA/en/home.html HTTP/1.1] org.projA.ctcweb.web.models.customModel RESOURCE PATH: /projectA/en/home/jcr:content/root/responsivegrid_1161940076/banner_1463578421
Question - Why is the /customMultifield/item0 not being passed to the sling model?
Thanks,
NK