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

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

Posted on June 21, 2013 0 Comments

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.

Comments
Comments are disabled in preview mode.
Topics
Latest Stories
in Your Inbox

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

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
More From Progress
New Digital Challenges, New Me: Meet Sitefinity DX 14.0
Read More
 
232x131_ResourceImage
Creating Epic Digital Experiences for B2B Companies
Read More
 
dev_thumb370x200
Five Reasons Why Developers Love Sitefinity Marketplace
Read More