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

Default Blog Top Image
by Stoimen Stoimenov Posted on June 21, 2013
The content you're reading is getting on in years.

This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

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

Stoimen Stoimenov
Stoimen Stoimenov is Senior QA Engineer in Sitefinity Division. He is responsible for the overall quality of the product and leading various QA tasks in the team.
More from the author

Related Products:

Sitefinity

Digital content and experience management suite of intelligent, ROI-driving tools for marketers and an extensible toolset for developers to create engaging, cross-platform digital experiences.

Get started
Prefooter Dots
Subscribe Icon

Latest Stories in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation