On Fri, 2016-07-01 at 15:19 +0200, Bertrand Delacretaz wrote:
> Hi,
> 
> Once the required engine is implemented, which is just a few lines of
> code to wrap the script and let Groovy compile and run it, a script
> like
> 
> // r is the current resource, in a Groovy wrapper
> // that provides some navigation/aggregation functions
> root {
>   def kids = r.child("sub").children("kid", 3)
>   path r.path
>   title r.props.title
>   childCount kids.size
>   childPaths kids.collect { r -> path:r.path }
> }
> 
> 

Nice and concise, looks good!

How do you see this code snippet deployed in a Sling instance - is this
a regular script deployed under /libs|/apps or something else?

Thanks,

Robert

Reply via email to