You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/28 14:19:57 UTC

[jira] [Commented] (SLING-5813) Allow a Resource to be used as a Sightly Use-Object with data-sly-use

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

ASF GitHub Bot commented on SLING-5813:
---------------------------------------

GitHub user vladbailescu opened a pull request:

    https://github.com/apache/sling/pull/151

    SLING-5813 - Allow a Resource to be used as a Sightly Use-Object with data-sly-use

    * Added a new UseProvider for Resource objects
    * Added tests

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vladbailescu/sling SLING-5813_Resource_data-sly-use

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/sling/pull/151.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #151
    
----
commit 89fb8a6410b8f5523b38cb7426189c0d8d0d7458
Author: vladbailescu <ba...@adobe.com>
Date:   2016-02-16T16:00:53Z

    SLING-5813 - Allow a Resource to be used as a Sightly Use-Object with data-sly-use
    
    * Added a new UseProvider for Resource objects
    * Added tests

----


> Allow a Resource to be used as a Sightly Use-Object with data-sly-use
> ---------------------------------------------------------------------
>
>                 Key: SLING-5813
>                 URL: https://issues.apache.org/jira/browse/SLING-5813
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting Sightly Engine 1.0.18
>            Reporter: Vlad Bailescu
>            Priority: Minor
>             Fix For: Scripting Sightly Engine 1.0.20
>
>
> At the moment, if we want to use a {{Resource}} (to invoke it's properties for example) we need a helper Use-Object to provide it. It would be more straightforward if we could just load it by path and bind it to a variable via {{data-sly-use}}:
> {code}
> <sly data-sly-use.myRes="${'some/path'}">${myRes.title}</sly>
> {code}



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