A developer wants to render Hello World' only in edit mode. Which approach would be used?
In AEM, the Sightly/HTL scripting language is used to develop robust and secure components. To render content conditionally based on the WCM (Web Content Management) mode, the wcmmode object is used. The correct property to check if the current mode is edit is wcmmode.edit. The HTL syntax for testing a condition is data-sly-test followed by the condition in ${}. The option B correctly uses this syntax to test if the WCM mode is edit, and if so, renders 'Hello World'.
Option A uses wcm.edit which is not the correct object property.
Option C uses wcmmode editor which is not the correct property and the syntax has a typo (should be data-sly-test).
Ivette
22 days agoDorcas
23 days agoErick
14 days agoMiles
28 days agoVivan
1 months agoLauran
1 months agoLuisa
4 days agoAlyssa
11 days agoFelton
20 days agoDwight
1 months agoHello World
Rory
2 months agoBulah
1 months agoLashaunda
1 months agoVivan
2 months agoHello World