Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Scripting Sightly Engine 1.0.18
-
None
Description
A common pattern for sending information between scripts/components is setting specific attributes in request scope before including another resource or script. At the moment this cannot be done nicely in Sightly.
It would be very helpful to set request attributes as in following examples:
<sly data-sly-include="${'script.html' @ requestAttributes=helper.attributesMap}"/>
or:
<sly data-sly-resource="${'some/path' @ resourceType='some/type', requestAttributes=helper.attributesMap}"/>
where attributesMap is a Map<String, Object>
The attributes would be set before the actual script/resource inclusion and reset/unset back afterwards.
Attachments
Issue Links
- breaks
-
SLING-7538 Request attributes not correctly reset after using data-sly-resource or data-sly-include with requestAttributes
- Resolved
- is related to
-
SLING-7515 ResourceRuntimeExtension: Allow to pass arbitrary options a request attributes via data-sly-resource
- Open
-
SLING-6636 Add request-attributes to SlingHttpServletRequest
- Resolved
- links to