Forked from kevinweber/Sightly Pattern "Inline List"
Created
September 19, 2018 09:50
-
-
Save Surajkamdi/c6185ee1e385cc4e139f2a61a2577cc9 to your computer and use it in GitHub Desktop.
AEM/HTL: Define a list/array within a HTL template (and avoid redundant code!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--/* We can define a list within a Sightly template to avoid redundant code */--> | |
<sly data-sly-test.versions="${['desktop', 'mobile']}"/> | |
<sly data-sly-list.identifier="${versions}"> | |
<div class="element ${identifier}">Repeated content</div> | |
</sly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="element desktop">Repeated content</div> | |
<div class="element mobile">Repeated content</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment