Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E123 Topic 2 Question 20 Discussion

Actual exam question for Adobe's AD0-E123 exam
Question #: 20
Topic #: 2
[All AD0-E123 Questions]

A developer wants to render Hello World' only in edit mode. Which approach would be used?

Show Suggested Answer Hide Answer
Suggested Answer: B

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).


Contribute your Thoughts:

Ivette
2 months ago
Hey, where's the 'all of the above' option? Gotta cover all the bases, you know?
upvoted 0 times
...
Dorcas
2 months ago
Option B for sure! That's the classic way to do this kind of thing in AEM.
upvoted 0 times
Hillary
23 days ago
User 3: Option B it is then. Thanks for the clarification!
upvoted 0 times
...
Robt
26 days ago
User 2: Yeah, I agree. That's the classic approach for rendering 'Hello World' in edit mode.
upvoted 0 times
...
Erick
2 months ago
I think option B is the way to go.
upvoted 0 times
...
...
Miles
2 months ago
Hmm, I'm not sure about this one. Option C doesn't look quite right to me.
upvoted 0 times
...
Vivan
2 months ago
I see your point, but I still think A) is the right choice because it checks for 'wcm.edit' specifically
upvoted 0 times
...
Lauran
2 months ago
I'm going to go with Option A. It's a bit more straightforward and easier to read.
upvoted 0 times
Luisa
1 months ago
User 3: I agree, Option A is definitely the best choice.
upvoted 0 times
...
Alyssa
1 months ago
Yeah, Option A seems simpler and clearer.
upvoted 0 times
...
Felton
2 months ago
I think Option A is the way to go.
upvoted 0 times
...
...
Dwight
2 months ago
I disagree, I believe the answer is B)

Hello World

upvoted 0 times
...
Rory
3 months ago
Option B looks the most correct to me. Using the wcmmode.edit variable seems like the right way to check if we're in edit mode.
upvoted 0 times
Bulah
2 months ago
I agree, option B is the way to go. It's important to use the correct variable for checking edit mode.
upvoted 0 times
...
Lashaunda
2 months ago
Option B looks the most correct to me. Using the wcmmode.edit variable seems like the right way to check if we're in edit mode.
upvoted 0 times
...
...
Vivan
3 months ago
I think the correct answer is A)

Hello World

upvoted 0 times
...

Save Cancel