SITECORE-XM-CLOUD-DEVELOPER practice question 8 of 10

A developer needs to configure a rendering in order to use dynamic placeholders. Which of the following steps is required? Select all that apply.

Full set: 49 questions
Answer options
A: Include the IDynamicPlaceholder base template in the Rendering Parameters template. Correct answer
B: Link the placeholder settings item to the rendering item. Correct answer
C: Define the placeholder key using a question mark (?) in the placeholder settings item. Correct answer
D: In the component TSX file, set a unique placeholder key value that has not yet been defined.
Correct Answer:
A. Include the IDynamicPlaceholder base template in the Rendering Parameters template.; B. Link the placeholder settings item to the rendering item.; C. Define the placeholder key using a question mark (?) in the placeholder settings item.
Explanation

To make a rendering support dynamic placeholders you must 1) expose the Dynamic Placeholder fields by inheriting the IDynamicPlaceholder base template in the rendering-parameters template, 2) register each placeholder settings item in the Placeholder(s) field of the rendering item so Experience Editor can recognize and enable the dynamic placeholder, and 3) declare the placeholder key in the placeholder settings item using the “?” (dynamic-token) so Sitecore can append a unique identifier at runtime. A unique key does not have to be hard-coded in the TSX file; Sitecore generates the instance-specific suffix automatically.

Why Incorrect

D. Dynamic keys are appended automatically by Sitecore; the component code reuses the configured placeholder name and therefore does not require (and must not invent) a new unique key.

References

1. Sitecore XM Cloud Developer Docs → Layout and Rendering → “Configure dynamic placeholders” (2023-07-12), Steps 1–3.

2. Sitecore Experience Platform 10.3 Developer Guide, ch. “Layout”, sec. “Walkthrough: Adding dynamic placeholders”, pp. 146–148.

3. Sitecore Template Reference: /sitecore/templates/System/Layout/Placeholder Settings/IDynamicPlaceholder, field descriptions “Placeholder Key” and “Dynamic Placeholder Token (?)”.

4. Sitecore XM Cloud Content Editor Guide, sec. “Linking placeholder settings to a rendering”, p. 62.

Scroll to Top