+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Module Content Type Hierarchy Advice

Module Content Type Hierarchy Advice

4 posts, 0 answered
  1. Brian
    Brian avatar
    8 posts
    Registered:
    02 Aug 2014
    04 Aug 2014
    Link to this post

    Hi,

    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. I'd like to get some feedback on how best to achieve the following from those who've been in the trenches with SiteFinity.

    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 whereby a festival could also be 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.

  2. Grisha 'Greg' Karanikolov
    Grisha 'Greg' Karanikolov avatar
    156 posts
    Registered:
    30 Nov 2016
    07 Aug 2014
    Link to this post
    Hi Brian,

    Typically, you would structure content types under other content types (parent-child relationships) if there is a logical relation between these. In this case, for example, you'd place the Carnival of Venice under Venice, as it doesn't happen anywhere else.
    In another example, if you have another festival, that can happen in one city this year, but in another - the next - it doesn't really make sense to place it as a child content type of "Cities". If it's relevant to a country, i.e. it will happen for example in Italy for sure, you can make it as a child content type of "Countries".

    In any case, you can relate "Festivals" to "Cities" using a related data field, regardless of their position in the parent-child structure of a module.

    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
  3. Brian
    Brian avatar
    8 posts
    Registered:
    02 Aug 2014
    15 Aug 2014 in reply to Grisha 'Greg' Karanikolov
    Link to this post
    Perfect, I'd come to the same conclusion that once a 'type' does fit into a linear hierarchy that it then has to exist at a higher level in the content type design.
  4. Grisha 'Greg' Karanikolov
    Grisha 'Greg' Karanikolov avatar
    156 posts
    Registered:
    30 Nov 2016
    18 Aug 2014
    Link to this post
    Awesome,

    Glad I confirmed your conclusions!

    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
     
4 posts, 0 answered