This post is Part 5 of a 5-part series: Architecting Widgets in Sitecore.
You can navigate the other posts in this series by clicking on the links below. You can always refer back to Part 1: Introduction, key questions and terminology for any clarification around Sitecore terminology used in this series.
- Part 1: Introduction, key questions and terminology
- Part 2: Clean and Simple: Using a rich text area
- Part 3: Usability Plus: Using the Page Designer
- Part 4: Mix n’ Match: Building a widget library
- Part 5: Ultimate Flexibility: Complementing the Page Designer with a data source
In this post, we will be looking at how to combine the Page Designer with a custom data source for ultimate flexibility in creating and mixing your widgets together.
Ultimate Flexibility: Complementing the Page Designer with a data source
Implementation: Difficult
Content authoring process: Difficult
Use this option if you want to grant your content authors the ultimate flexibility of creating and mixing-and-matching widgets in multiple areas of your site. In this scenario, you will use the Page Designer (as in Scenario One), but you will need to take additional steps, as outlined below.
- Create a library of widget data templates as in Scenario Two of my last post (these will act as your data source)
- Select a sublayout / rendering in Page Designer mode.
- Assign a data source to your sublayout / rendering from the widget library created in Step One. Note that the fields in your sublayout / rendering need to match the fields in your widget data template.
This option requires that your Sitecore developer create custom coding that will assign a different data source to the rendering / sublayout than the parent page – it is not native Sitecore functionality. Depending on the implementation, the content author may need to go through multiple steps before being able to publish a widget.
The best practice solution can be found here.
And that brings us to the end of this blog series on architecting widgets in Sitecore. As is now clear, there are several ways to enable your content authors to successfully add and configure widgets on your Sitecore-managed website, all with tradeoffs in flexibility, complexity and user-friendliness. Use these guidelines to identify which scenario best fits your needs, and you’ll be well on your way to implementing a widget approach in Sitecore that’s optimal for you and your content authors.
As always, additional information on Sitecore is available on the Sitecore Developer Network and the NLC blog.
If you find that you need further assistance, you can reach us by email at sitecore@nonlinear.ca.
