Skip to content

Instantly share code, notes, and snippets.

@kuckmc01
Last active September 22, 2016 20:17
Show Gist options
  • Save kuckmc01/f43388b727c56e2be185363570baf3ce to your computer and use it in GitHub Desktop.
Save kuckmc01/f43388b727c56e2be185363570baf3ce to your computer and use it in GitHub Desktop.
Dynamicially resource include in sightly
/** Single Resource **/
<sly data-sly-test.dynamicValue="${someValue}"/>
<sly data-sly-test.dynamiceName="${['my-resource-prefix-',dynamicValue ] @ join = ''}"/>
<sly data-sly-resource="${ @path=dynamicName, resourceType='/apps/my/component'}" />
/** Multiple Resources **/
<sly data-sly-list="${myList}">
<sly data-sly-test.dynamiceName="${['my-resource-prefix-', itemList.count ] @ join = ''}"/>
<sly data-sly-resource="${ @path=dynamicName, resourceType='/apps/my/component'}" />
</sly>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment