Try Now
More in this section
Blogs RSS feed

One to Many Relationships in Sitefinity Dynamic Modules - the Simple Way

by Stoimen Stoimenov
Dynamic Modules in Sitefinity offer great possibilities for custom development and one of the most common scenarios is to relate several content types. There are some blog posts on this topic (like this one and this one) but they were written long time ago and the approaches described there are obsolete or there is an easier way to achieve the end result - having "one to one" and "one to many" relationships.

To speed up the whole process I advise you to install Sitefinity Thunder - it's a Visual Studio plugin that provides some handy features like editing Sitefinity themes or uploading your project to Azure and of course a user control that is used to select dynamic items). Just get Thunder and install it to your Sitefinity Project and then follow my video.

Let me briefly describe what is going on in the video:

  1. First we need to have two content types for which we are going to relate. The content types can be even in different dynamic modules
  2. Then field selector for dynamic items is added from thunder - it has nice UI so no codding is needed to specify which is the content type used for relations
  3. A new field is added to the Authors content type named Books which is "Array of GUIDs" and for interface widget we are specifying our new field control
  4. After that we relate several items from the content menu and display them in a frontend page using some special properties in the dynamic widgets.
And here is the video showing how to setup everything in under 5 minutes - http://screencast.com/t/oEtElX4uM7i


Leave a comment
  1. Faramarz Jun 27, 2013

    This is great but looks like this solution only works with dynamic modules.  Is there a way to do this for 'Events' module?  I want to create Related Events for my Events module. What's the best practice for doing that?

  2. Stoimen Jun 27, 2013

    The main issue with built in modules like events is that they don't have a GUID field. But a colleague of mine is preparing a blog post how to add array of guid fields to the built in modules like events and after that you will be able to achieve similar relation of data as in the dynamic modules. So please stay tuned as the blog post will be rolling out in a couple of days. Otherwise I advice you to submit support ticket where we can show you more details as it is not so trivial to be submitted in a comment

    P.S. This will probably be included in the project in some of the future releases as it is highly requested from the support channel
  3. Guy Aug 12, 2014


    It seems that the screen cast is no longer available, is there another link to the video ?

    Leave a comment