A developer wants to customize a core component.
Which property needs to be set in the new component to achieve this goal?
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).
Currently there are no comments in this discussion, be the first to comment!