Search code examples
content-management-systemrelationshipcontent-typesitefinity

Sitefinity module recursive content type relationships


I have a question for any SiteFinity experts out there. I'm coming from an umbraco background and have started developing a SiteFinity module to create a data container with relationships between entities.

There's an example of an online travel agency site on the Telerik YouTube channel. They build a module with the following content hierarchy;

Countries -> Cities -> Hotels
                    -> Restaurants
                    -> Airports
                    -> Festivals

https://www.youtube.com/watch?v=WCfc9GQoGoQ&feature=youtu.be

This all makes perfect sense if festivals were always located in a city. But what about the scenario where the festival is national? Would I have to implement the same content type of 'Festivals' against both 'Cities' and 'Countries' in order to accomplish this or is there a way to have 'Festivals' sit at the root of the hierarchy and allow me to selected a related 'Country' or 'City' as they are required?

Thanks, Brian.


Solution

  • You might want to make Festivals its own type(DynamicModule). Then you can use related content and relate a festival to a Country or City or Both. This is assuming you you are using Sitefinity 7.xx