His code example is doing exactly that, it sets yourName in the test, which can then be reused within or later on:<div data-sly-test.yourName="${currentPage.name}">....${yourName}</div>Have a quick look at the docs of data-sly-test to better understand that behavior.More generally though, if you nee...
I agree with Feike. Keep in mind that each data-sly-unwrap you're doing will represent one step you're moving away from having your template markup to correspond to your resulting markup. The goal of Sightly is to keep the two as close together as possible for making it as obvious as possible for so...
See full-length answer to the corresponding question on StackOverflow:http://stackoverflow.com/questions/25430981/are-there-requestscope-variables-in-sightly/25447524#25447524
I'd advise you to go with Sightly instead of JSP for any new project as it is designed to replace JSP. This will give you automatic proper HTML encoding and cross-site scripting protection built-in. It will also force some healthy separation of concerns, preventing the kind of code & markup mix you ...
Hi Paul,Resource properties can directly be accessed on the resource object itself and don't necessarily need to be accessed through the properties object:These two expressions do the same: ${resource.sling:resourceType} ${properties.sling:resourceType}But only properties can be iterated over, in ca...
You need to open the folder that contains the jcr_root folder (as well as the META-INF folder). In the case of projects created with the "AEM Sample Multi-Module Project" archetype, like the Eclipse plugin does, then you have to open ui.apps/src/main/content in Brackets.If you don't open the right f...
Btw, you can include with Sightly a taglib like you did in JSP; the generated markup is then the same.Have a look at the Client Library section of the docs Shekhar pointed you to:http://docs.adobe.com/content/docs/en/aem/6-0/develop/sightly.html#Client%20Libraries
Hi James,We are working on improving this. But for now you can listen to the cq-layer-activated event, which will pass an object containing the new layer being activated (layer) and the previous one (prevLayer). You can then get the active layer as described with Granite.author.layerManager.getCurre...
FYI, we've just released the Brackets extension that should do what you're looking for:http://docs.adobe.com/docs/en/dev-tools/sightly-brackets.htmlBest,Gabriel