BlackFriday 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
19 days 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
...
Benton
20 days 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
23 days ago
Definitely B and C. I can already picture the customer segment conditions and the custom block layout. Easy peasy!
upvoted 0 times
Leoma
8 hours 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
11 days 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
1 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
1 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
1 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
8 days ago
Let's go with B and C then for the implementation.
upvoted 0 times
...
Cyril
13 days ago
I agree, using a pHTML template does sound nice.
upvoted 0 times
...
Derrick
18 days ago
C sounds like a good idea to add a custom block and pHTML template.
upvoted 0 times
...
Colette
26 days ago
I think B is a good option to create a Customer Segment.
upvoted 0 times
...
...
Annelle
1 months ago
I think the Architect should choose option B to create a Customer Segment.
upvoted 0 times
...
Felix
2 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
15 days ago
Evangelina: That sounds simple and effective for displaying the additional content on the home page.
upvoted 0 times
...
Evangelina
18 days ago
Bettina: Then we can add a custom block with the content to the cmsjndexjndex.xml layout.
upvoted 0 times
...
Bettina
19 days ago
Agreed, that way we can target specific attribute values easily.
upvoted 0 times
...
Erin
1 months ago
I think we should create a Customer Segment with 'my.attribute' in the conditions.
upvoted 0 times
...
...

Save Cancel