Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E123 Exam - Topic 1 Question 1 Discussion

Actual exam question for Adobe's AD0-E123 exam
Question #: 1
Topic #: 1
[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:

0/2000 characters
Margarett
4 months ago
Totally agree with A, it's the simplest solution!
upvoted 0 times
...
Lemuel
4 months ago
Wait, is there a typo in C? That doesn't seem right.
upvoted 0 times
...
Coletta
4 months ago
C looks off to me, not sure about that one.
upvoted 0 times
...
Serita
4 months ago
I think B is the right choice.
upvoted 0 times
...
Una
4 months ago
Option A is correct!
upvoted 0 times
...
Kerry
5 months ago
I’m leaning towards option B too, but I wonder if there’s a chance A could work as well.
upvoted 0 times
...
Nichelle
5 months ago
I'm a bit confused about option C; I don't recall seeing `wcmmode editor` used like that in our examples.
upvoted 0 times
...
Beata
5 months ago
I remember practicing with similar questions, and I feel like option B might be the right one since it uses `wcmmode.edit`.
upvoted 0 times
...
Misty
5 months ago
I think option A looks familiar, but I’m not entirely sure if it’s the correct syntax for checking edit mode.
upvoted 0 times
...
Artie
5 months ago
I'm feeling good about this one. Option B is the way to go - using the `wcmmode.edit` expression to check the edit mode and conditionally render the text. Seems like a straightforward solution to the problem.
upvoted 0 times
...
Apolonia
5 months ago
Option C seems a bit off to me. The `data-sly-test='${wcmmode editor}'` expression doesn't look quite right. I'm pretty confident that either option A or B would be the way to go here.
upvoted 0 times
...
Yvonne
5 months ago
Hmm, I'm a bit unsure about this one. I think option A might also work, using `data-sly-test='${wcm.edit}'`. I'll need to double-check the documentation to be sure which one is the correct approach.
upvoted 0 times
...
Magda
5 months ago
This looks straightforward. I'd go with option B - using the `data-sly-test='${wcmmode.edit}'` expression to check if the page is in edit mode and only render the "Hello World" text in that case.
upvoted 0 times
...
Johnna
5 months ago
Okay, let me think this through. Service-orientation is all about modular, reusable components, so I'm guessing the answer is not something directly related to that.
upvoted 0 times
...
Merri
6 months ago
Hmm, this is a complex one. I like the idea of piloting the new process in the corporate IT department first before rolling it out more broadly. That way we can work out any kinks and make sure it's really ready before deploying it across all the countries.
upvoted 0 times
...
Raymon
2 years ago
I personally prefer B) as the answer, as it uses 'wcmmode.edit' which seems more intuitive to me.
upvoted 0 times
...
Tony
2 years ago
I also think A) is the correct answer, as it directly checks for 'wcm.edit' without any additional asterisks or typos that could cause errors.
upvoted 0 times
...
Stevie
2 years ago
I think A) is the correct answer because it specifically checks for 'wcm.edit' which is used for edit mode.
upvoted 0 times
...
Elenora
2 years ago
I'm not sure, but I think it could be C)

Hello World

because it seems like it could be the correct format for rendering only in edit mode.
upvoted 0 times
...
Tamar
2 years ago
I disagree, I believe the answer is B)

Hello World

as it is more commonly used in practice.
upvoted 0 times
...
Clare
2 years ago
I think the answer is A)

Hello World

because it is the correct syntax for rendering in edit mode.
upvoted 0 times
...
Dorothy
2 years ago
I'm not sure, but I think C)

Hello World

might also work, as it seems to reference the editor mode.
upvoted 0 times
...
Kristal
2 years ago
I disagree, I believe the correct answer is A)

Hello World

as it directly checks if the page is in edit mode.
upvoted 0 times
...
Alana
2 years ago
I think the answer is B)

Hello World

because it checks if the page is in edit mode correctly.
upvoted 0 times
...

Save Cancel