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 6 Question 30 Discussion

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

Devorah
2 months ago
B and C all the way! I mean, who doesn't love a good customer segment and a custom block? It's like the dynamic duo of Magento development.
upvoted 0 times
Ruby
7 days ago
E) Use customer-data JS library to retrieve 'my.attribute' value
upvoted 0 times
...
Tresa
11 days ago
Yes, those two steps would work perfectly for this scenario.
upvoted 0 times
...
Lyndia
12 days ago
C) Add a custom block and a pHTML template with the content to the cmsjndexjndex.xml layout
upvoted 0 times
...
Sheridan
14 days ago
B) Create a Customer Segment and use 'my.attribute' in the conditions
upvoted 0 times
...
...
Benton
2 months ago
Hmm, I was thinking about going with A and E, but now I'm not so sure. B and C do sound like the way to keep things simple. *chuckles* I bet the full page cache is going to love this one!
upvoted 0 times
...
Trinidad
2 months ago
Definitely B and C. I can already picture the customer segment conditions and the custom block layout. Easy peasy!
upvoted 0 times
Louisa
1 months ago
Exactly! That way, the content will only display to Customers with the specified 'my.attribute' value. It's a simple and effective solution.
upvoted 0 times
...
Leoma
1 months ago
Yes, that's a good start. And then we can add a custom block and pHTML template to the cmsjndexjndex.xml layout for the additional content.
upvoted 0 times
...
Arlette
1 months ago
I think B is the way to go. Creating a Customer Segment with 'my.attribute' in the conditions seems like the right approach.
upvoted 0 times
...
...
Adrianna
2 months ago
I believe option E to use customer-data JS library is also important for retrieving the 'my.attribute' value.
upvoted 0 times
...
Krissy
2 months ago
I agree with Annelle, and I also think option D to add a dynamic block to the Home Page is necessary.
upvoted 0 times
...
Francesco
2 months ago
I agree with Jane. B and C are the way to go. Plus, I always enjoy a good pHTML template - it just rolls off the tongue, you know?
upvoted 0 times
Ariel
1 months ago
Let's go with B and C then for the implementation.
upvoted 0 times
...
Cyril
2 months ago
I agree, using a pHTML template does sound nice.
upvoted 0 times
...
Derrick
2 months ago
C sounds like a good idea to add a custom block and pHTML template.
upvoted 0 times
...
Colette
2 months ago
I think B is a good option to create a Customer Segment.
upvoted 0 times
...
...
Annelle
2 months ago
I think the Architect should choose option B to create a Customer Segment.
upvoted 0 times
...
Felix
3 months ago
Option B and C seem like the way to go here. Using a customer segment to target the specific attribute value, and then adding a custom block to display the content seems like the simplest approach.
upvoted 0 times
Lera
2 months ago
Evangelina: That sounds simple and effective for displaying the additional content on the home page.
upvoted 0 times
...
Evangelina
2 months ago
Bettina: Then we can add a custom block with the content to the cmsjndexjndex.xml layout.
upvoted 0 times
...
Bettina
2 months ago
Agreed, that way we can target specific attribute values easily.
upvoted 0 times
...
Erin
2 months ago
I think we should create a Customer Segment with 'my.attribute' in the conditions.
upvoted 0 times
...
...

Save Cancel