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-E722 Topic 4 Question 24 Discussion

Actual exam question for Adobe's AD0-E722 exam
Question #: 24
Topic #: 4
[All AD0-E722 Questions]

An Adobe Commerce store owner sets up a custom customer attribute "my.attribute".

An Architect needs to display additional content on the home page, which should display only to Customers with "my.attribute" of a certain value and be the same content for all of them. The website is running Full Page Cache.

With simplicity in mind, which two steps should the Architect take to implement these requirements? (Choose two.)

Show Suggested Answer Hide Answer
Suggested Answer: A, D

To display additional content on the home page based on a custom customer attribute, the Architect needs to do the following steps:

Add a new context value of ''my_attribute'' to MagentoFrameworkAppHttpContext. This will allow the Full Page Cache to generate different versions of the page for customers with different values of ''my.attribute''. The context value can be set using a plugin on the MagentoCustomerModelContext class.

Add a dynamic block with the content to the Home Page. A dynamic block is a type of content block that can be configured to display only to specific customer segments or conditions. The Architect can use the 'my.attribute' in the conditions of the dynamic block and assign it to the Home Page in the Content > Blocks section of the Admin Panel.Reference:

Private content | Magento 2 Developer Documentation

Dynamic Blocks | Adobe Commerce 2.3 User Guide - Magento


Contribute your Thoughts:

Minna
3 months ago
I'm not sure about option C and D, they don't seem necessary for this specific requirement.
upvoted 0 times
...
Terrilyn
3 months ago
I'm surprised option D isn't the correct answer. Adding a dynamic block seems like it would be the most straightforward way to display the content. But I guess the full page cache complicates things.
upvoted 0 times
...
Bea
3 months ago
I agree, adding a new context value and creating a Customer Segment seem like the right approach.
upvoted 0 times
...
Tamar
3 months ago
Haha, I bet the architect could have saved a lot of time if they had just named the attribute 'my_attribute' from the start. But B and C are still the way to go here.
upvoted 0 times
Vonda
3 months ago
Definitely, it's all about setting things up correctly from the beginning. B and C will definitely get the job done.
upvoted 0 times
...
Mozell
3 months ago
Yeah, naming conventions are important for clarity. B and C seem like the best options for this situation.
upvoted 0 times
...
...
Clay
3 months ago
Hmm, I'm not sure about E. Trying to retrieve the attribute value using customer-data JS library might be overkill for this use case. B and C seem like the cleaner solution.
upvoted 0 times
...
Lezlie
3 months ago
I think option A and option B are the correct steps to implement the requirements.
upvoted 0 times
...
Telma
3 months ago
I agree with Horace on this one. B and C are the most straightforward options to implement this requirement while maintaining the Full Page Cache.
upvoted 0 times
Peggie
2 months ago
C) Add a custom block and a pHTML template with the content to the cmsjndexjndex.xml layout
upvoted 0 times
...
Annabelle
2 months ago
B) Create a Customer Segment and use 'my.attribute' in the conditions
upvoted 0 times
...
...
Horace
3 months ago
I think B and C are the way to go. Using a customer segment to target the specific attribute value, and then adding a custom block with the content seems like the simplest approach.
upvoted 0 times
Ty
2 months ago
Yeah, that should work well for displaying the additional content on the home page.
upvoted 0 times
...
Sena
2 months ago
Agreed, creating a Customer Segment and adding a custom block with the content sounds simple.
upvoted 0 times
...
Leanora
3 months ago
I think B and C are the way to go.
upvoted 0 times
...
...

Save Cancel