[ 
https://issues.apache.org/jira/browse/SLING-6384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-6384.
-----------------------------------
    Resolution: Fixed

Completed: At revision: 1773428  

the binding provider automatically defines a scripting variable {{caconfig}} 
that can be used in this fashion:

access a property of a singleton resource:
{code:html}
<dl>
<dt>stringParam:</dt>
<dd>${caconfig['x.y.z.ConfigSample'].stringParam}</dd>
</dl>
{code}

iterator over config resource collection:
{code:html}
<ul data-sly-list.item="${caconfig['x.y.z.ConfigSampleList']}">
<li>stringParam: ${item.stringParam}</li>
</ul>
{code}

the list is only supported when configuration metadata is present.

> Context-Aware Config: Bindings Value Provider for HTL/Sightly
> -------------------------------------------------------------
>
>                 Key: SLING-6384
>                 URL: https://issues.apache.org/jira/browse/SLING-6384
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Stefan Seifert
>            Assignee: Stefan Seifert
>              Labels: contextaware-config
>             Fix For: Context-Aware Configuration Impl 1.2.0
>
>
> when accessing context-aware configuration from sightly templates it would be 
> useful to do this directly instead of having to implement a sling model or 
> other glue code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to