ExamGecko
Question list
Search
Search

List of questions

Search

Question 208 - Certified B2B Commerce Administrator discussion

Report
Export

A developer has created a custom Lightning web component to display on the Product Detail 03m 10s page in the store. When the developer goes to add the component to the page in Experience Builder, it is missing from the list of custom components.

Which XML fragment should the developer include in the component's configuration XML file to ensure the custom component is available to add to the page?

A.
<builder>ExperienceCloud</builder> <target>RecordPage</target>
Answers
A.
<builder>ExperienceCloud</builder> <target>RecordPage</target>
B.
<isExposed target='ExperienceCloud'> | RecordPage i </isExposed>
Answers
B.
<isExposed target='ExperienceCloud'> | RecordPage i </isExposed>
C.
<isAvailable>true</isAvailable> <targets=lightningCommunity_RecordPage<targets> <isExposed>true</isExposedTrue> <targets>
Answers
C.
<isAvailable>true</isAvailable> <targets=lightningCommunity_RecordPage<targets> <isExposed>true</isExposedTrue> <targets>
D.
<target=lightningCommunity_Page</target> <targets>
Answers
D.
<target=lightningCommunity_Page</target> <targets>
Suggested answer: B

Explanation:

<slot></slot> because this is the element that can be used to pass HTML from a parent component to a child component.The slot element is a placeholder for content that is defined in the parent component and inserted into the child component5.It allows creating reusable components with dynamic content6. For example, suppose there is a parent component that defines some HTML content inside a child component:

<!-- parent.html --> <template> <c-child>

This is some HTML content passed from the parent to the child. </c-child> </template>

The child component can use the slot element to render the content from the parent:

<!-- child.html --> <template> <h1>This is the child component.</h1> <slot></slot> <!-- This will display the content from the parent --> </template>

The output will look like this:

This is the child component. This is some HTML content passed from the parent to the child.

asked 23/09/2024
Brian Charlton,
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first