Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 01, 2010 @ 15:52
    Ismail Mayat
    0

    Relations vs related links

    Guys,

    In umbraco we have ability to create relations via the gui when copying content nodes, other relations can be made through the api.  

    We also have numerous datatypes that allow users to create related links between content and media.  So does this not make relations redundant? Basically creating this post to get better understanding of where relations fit into the bigger umbraco picture.

    Regards

    Ismail

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 01, 2010 @ 16:01
    Morten Bock
    2

    We are using the copy relations (API) to handle translation workflows. This makes sense since it is easy to find child relations of the original node at and send those to translation.

    I think the relations API is a cleaner way of doing relations than using multiple content pickers and suchm since I do not need to get properties from the nodes, and start splitting comma separated strings and such. It is also much easier to make two way relations with the API.

  • webmonger 130 posts 285 karma points
    Feb 01, 2010 @ 16:03
    webmonger
    2

    Hi Ismail

    The relationship datatypes are only one way relationships, so the child item is unaware its connected to it's parent object.

    If you need a 2 way, 1 to many or many to many relationship then it's impossible to do with the XML/CSV datatypes. This is where Relationships come in you can manage the connection to objects from both sides ie the child is aware of the parent as well as the parent knowing about the child.

    Hope that helps. If you want me to go in to more detail give me a shout.

    Jon

     

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Feb 01, 2010 @ 16:04
    Niels Hartvig
    3

    Relations are *real* relations, where as the Related links data type is simply a list of related nodes but it's "dumb" one since there's no programmatic way of accessing this information.

    The relation api on the other hand makes it possible to relate almost all types of Umbraco objects to each other and make the relation either one way or two way. This is used on this site for the "Events" section for instance. When you sign up for an event a relation is made between you (a Member) and an event (a Node). This way we can use the Relation API (and its xslt helper methods) to query information on attendees, but we could also easily show all events that you either are coming to or have been to using the same API.

    We'll cover this in details in a chapter on umbraco.tv later this quarter.

    Niels...

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 01, 2010 @ 16:47
    Ismail Mayat
    1

    Guys,

    Awesome many thanks, its the 2 way thing that has given me the light bulb moment.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft