Sitecore 10 .NET Developer Certification — Question 31
Currently, a Content Author has three rendering options with a complex datasource query. However, in order to swap the existing rendering for a new one, the author has to copy the datasource query, remove the old rendering, insert the new rendering, and paste the datasource query into the datasource field. According to Sitecore best practices, what should you do to reduce the chance of user error when an author needs to change out the rendering?
Answer options
- A. Split the renderings into smaller pieces so the Content Authors can add each field of the data source separately as desired.
- B. Merge all three renderings into one and have the Content Author select display mode through rendering parameters.
- C. Create a custom Experience Editor button and script the replacement.
- D. Add each rendering definition item to the Compatible Renderings option within each of the renderings.
Correct answer: C
Explanation
Creating a custom Experience Editor button and scripting the replacement (option C) streamlines the process for Content Authors, significantly reducing the possibility of errors when changing renderings. The other options either complicate the process (A and B) or do not directly address the issue of user error in rendering replacement (D).