BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E722 Exam - Topic 6 Question 30 Discussion

Posted by Jettie on Sep 15, 2024 at 10:18 AM

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

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


Get Premium AD0-E722 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
37 comments · newest first
MA
Mariann 12 months ago
Wait, can you really use E with Full Page Cache? That sounds off!
JE
Jeannine 1 year ago
D sounds like a quick fix, but is it really effective?
GL
Glory 1 year ago
C seems too complicated for this requirement.
TO
Toshia 1 year ago
I think B is the way to go for targeting customers.
CH
Chauncey 1 year ago
A is definitely needed to manage the context.
NU
Nu 1 year ago
I recall that using the customer-data JS library could help, but it might not be the simplest solution. I need to think more about how it all ties together.
JA
Jaleesa 1 year ago
I feel like we should add a dynamic block to the Home Page for the content. That seems like a straightforward approach, but I’m not 100% confident.
AL
Alexia 1 year ago
I'm not entirely sure, but adding a new context value could be important for retrieving the attribute. I remember something about context in our study materials.
SH
Sherell 1 year ago
I think we might need to create a Customer Segment using 'my.attribute' to target those specific customers. That sounds familiar from our practice questions.
CU
Curtis 1 year ago
Hmm, I'm a bit torn between a few of these options. I'll need to really think through the implications of each one to make sure I don't miss anything important. Maybe I'll jot down a quick pros and cons list to help me decide.
JA
Jaleesa 1 year ago
I'm feeling pretty confident about this one. The key is using the customer attribute to target the content, and the full page cache means I need to find a way to make it dynamic. Options B and D look like the way to go.
TI
Titus 1 year ago
Hmm, I'm a bit confused by the question. I'll need to re-read it a few times to make sure I understand the full context before attempting to answer.
BE
Bernadine 1 year ago
This looks like a tricky one. I'll need to carefully review the options and think through the requirements to make sure I choose the right steps.
KR
Krissy 1 year ago
Okay, I think I've got a good handle on this. I'll go with options B and C - creating a Customer Segment and adding a custom block to the layout. That should cover the requirements nicely.
DE
Devorah 2 years 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.
RU
Ruby 2 years ago
↳ replying to Devorah
E) Use customer-data JS library to retrieve 'my.attribute' value
TR
Tresa 2 years ago
↳ replying to Devorah
Yes, those two steps would work perfectly for this scenario.
LY
Lyndia 2 years ago
↳ replying to Devorah
C) Add a custom block and a pHTML template with the content to the cmsjndexjndex.xml layout
SH
Sheridan 2 years ago
↳ replying to Devorah
B) Create a Customer Segment and use 'my.attribute' in the conditions
BE
Benton 2 years 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!
TR
Trinidad 2 years ago
Definitely B and C. I can already picture the customer segment conditions and the custom block layout. Easy peasy!
LO
Louisa 2 years ago
↳ replying to Trinidad
Exactly! That way, the content will only display to Customers with the specified 'my.attribute' value. It's a simple and effective solution.
LE
Leoma 2 years ago
↳ replying to Trinidad
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.
AR
Arlette 2 years ago
↳ replying to Trinidad
I think B is the way to go. Creating a Customer Segment with 'my.attribute' in the conditions seems like the right approach.
AD
Adrianna 2 years ago
I believe option E to use customer-data JS library is also important for retrieving the 'my.attribute' value.
KR
Krissy 2 years ago
I agree with Annelle, and I also think option D to add a dynamic block to the Home Page is necessary.
FR
Francesco 2 years 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?
AR
Ariel 2 years ago
↳ replying to Francesco
Let's go with B and C then for the implementation.
CY
Cyril 2 years ago
↳ replying to Francesco
I agree, using a pHTML template does sound nice.
DE
Derrick 2 years ago
↳ replying to Francesco
C sounds like a good idea to add a custom block and pHTML template.
CO
Colette 2 years ago
↳ replying to Francesco
I think B is a good option to create a Customer Segment.
AN
Annelle 2 years ago
I think the Architect should choose option B to create a Customer Segment.
FE
Felix 2 years 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.
LE
Lera 2 years ago
↳ replying to Felix
Evangelina: That sounds simple and effective for displaying the additional content on the home page.
EV
Evangelina 2 years ago
↳ replying to Felix
Bettina: Then we can add a custom block with the content to the cmsjndexjndex.xml layout.
BE
Bettina 2 years ago
↳ replying to Felix
Agreed, that way we can target specific attribute values easily.
ER
Erin 2 years ago
↳ replying to Felix
I think we should create a Customer Segment with 'my.attribute' in the conditions.
0/2000 characters

Save Cancel