[
https://issues.apache.org/jira/browse/SLING-4174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Feike Visser updated SLING-4174:
--------------------------------
Description:
I want to propose a new operation in Sightly: data-sly-repeat.
This to overcome situations where you want to loop through items, but where you
don't have a container element in your markup.
This is possible with data-sly-list and data-sly-unwrap, but that forces you to
add markup.
{code}
<div data-sly-list="${resource.listChildren}" data-sly-unwrap>
<div>${child.path}</div>
</div>
{code}
With data-sly-repeat you would be able to write it like this:
{code}
<div data-sly-repeat="${resource.listChildren}">${child.path}</div>
{code}
Moved spec-discussion to :
https://github.com/Adobe-Marketing-Cloud/sightly-spec/issues/4
was:
I want to propose a new operation in Sightly: data-sly-repeat.
This to overcome situations where you want to loop through items, but where you
don't have a container element in your markup.
This is possible with data-sly-list and data-sly-unwrap, but that forces you to
add markup.
{code}
<div data-sly-list="${resource.listChildren}" data-sly-unwrap>
<div>${child.path}</div>
</div>
{code}
With data-sly-repeat you would be able to write it like this:
{code}
<div data-sly-repeat="${resource.listChildren}">${child.path}</div>
{code}
> introduction of data-sly-repeat
> -------------------------------
>
> Key: SLING-4174
> URL: https://issues.apache.org/jira/browse/SLING-4174
> Project: Sling
> Issue Type: New Feature
> Components: Scripting
> Reporter: Feike Visser
>
> I want to propose a new operation in Sightly: data-sly-repeat.
> This to overcome situations where you want to loop through items, but where
> you don't have a container element in your markup.
> This is possible with data-sly-list and data-sly-unwrap, but that forces you
> to add markup.
> {code}
> <div data-sly-list="${resource.listChildren}" data-sly-unwrap>
> <div>${child.path}</div>
> </div>
> {code}
> With data-sly-repeat you would be able to write it like this:
> {code}
> <div data-sly-repeat="${resource.listChildren}">${child.path}</div>
> {code}
> Moved spec-discussion to :
> https://github.com/Adobe-Marketing-Cloud/sightly-spec/issues/4
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)