Bi-directional one-to-many and many-to-many relationships in Sitecore

Sitecore out-of-the-box does not come with a feature built-in that would allow you to setup bi-directional relationship between items. Hence, I have decided to write my own solution and share it with the community.

John has done a great job describing the various ways how item updates can be intercepted in the following post.

The two options that I identified as the most viable were either write a custom Sitecore handler for the OnItemSaved event (option 1) or write a rule (option 4). The advantages for the rule mentioned by John convinced me that this would be the best option. Here are some of the reasons summarised:

  • Control logic and parameters through UI from content authoring environment
  • Separation of concerns: Rule condition under which the rule runs is part of the configuration
  • Rule only executes on the database that it is configured

Continue reading “Bi-directional one-to-many and many-to-many relationships in Sitecore”

Enable dynamic MVC content place holders for Sitecore – Part 2

This is the second part of a blog series talking about enabling dynamic content place holders with meaningful names using MVC.

Let’s see how we can bring the page editor to life with what was described in the first part of this series. As a starting point I got inspired by an article on Stackoverflow.

Customised GetAllowedRenderings

This customisation is required so that the we only need one entry in the Placeholder Settings section. Out-of-the box Sitecore is loading these settings based on the place holder name but since in our case that name is dynamic you would have to add an entry for each dynamic place holder which would be very cumbersome.
Continue reading “Enable dynamic MVC content place holders for Sitecore – Part 2”