Dynamic Content Relationships

Posted by Community Admin on 04-Aug-2018 16:08

Dynamic Content Relationships

All Replies

Posted by Community Admin on 28-Aug-2014 00:00

Imagine the scenario whereby I have a dynamic module that has types 'A' and 'B' and A has a related data field to items of type B. In code, I can easily get the related items from A by calling 'GetRelatedItems'. However, in code I would like to get the items of type A that are related to an instance of B. The only way I can see to do this would be to get all items of type 'A', get their related items of type 'B' and check whether any of them are the same as my current instance of B. This seems very expensive. Is there anyway to get the parents of a child item?

Posted by Community Admin on 28-Aug-2014 00:00

I would also like some clarification on this.  Right now, I'm using SQL queries and Domain Models, but it would be great to use the API, especially for localization where direct SQL isn't really a good option.

Posted by Community Admin on 01-Sep-2014 00:00

Hi folks,

I think there's an example of that exactly within the Sitefinity documentation.

There's also a video that includes an exactly that case:

youtu.be/WVKasAtZZYk

Hope that helps!

Regards,
Grisha 'Greg' Karanikolov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed