You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2014/11/17 10:18:34 UTC

[jira] [Commented] (SLING-4174) introduction of data-sly-repeat

    [ https://issues.apache.org/jira/browse/SLING-4174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214443#comment-14214443 ] 

Stefan Seifert commented on SLING-4174:
---------------------------------------

+1

> 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}



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