Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Relating Data (Doc. Types) to Each Other View modes: 
User avatar
Member
Member
russ-thresholdinteractive - 10/28/2010 4:43:13 PM
   
Relating Data (Doc. Types) to Each Other
Greetings,

I have a Chef doc type and a Recipe doc type. Chefs can obviously be responsible for more than one recipe, but it's also possible that recipes can be created by more than one chef.

Is there any way to set it up so that my chef page can show all the recipes (s)he has collaborated on, and have the recipe page show all the chefs responsible for that recipe out of the box?

Thanks,
Russ

User avatar
Member
Member
kentico_michal - 11/1/2010 5:18:20 PM
   
RE:Relating Data (Doc. Types) to Each Other
Hi,

Each relationship between two documents defines left and right document and you need to take into consideration on which side of relationship document has been created when trying to display related documents. I will try to give you simple example.
Let’s assume that I have two Chefs (Chef1 and Chef2) that created one Recipe, so I specify following relationship:

Left document ------- Relationship name ------- Right document
Chef1----------------------------- is related to-------------------Recipe
Chef2----------------------------- is related to-------------------Recipe

You need to make sure that if you want to display left document for particular right document (in this case on Recipe page I want to display link to Chef1 and Chef2 page) you need to set Current document is on the left side: property of Related document web part to false, because Recipe document is on the right side of the relationship and vice versa for Chef1 and Chef2 page.


Best regards,
Michal Legen

User avatar
Member
Member
jefferey.berger-ottawa - 5/15/2012 2:56:34 PM
   
RE:Relating Data (Doc. Types) to Each Other
Continuing the example, what if I wanted to use a transformation to display some information about the "recipe" (other than the documentname). In this case I'm thinking about some custom field stored in the custom.recipe table.
Can I use the related documents web part + some transformation to pull in custom fields from other document types?
Much thanks,
Jeff

User avatar
Member
Member
kentico_michal - 5/17/2012 6:26:29 AM
   
RE:Relating Data (Doc. Types) to Each Other
Hi,

Regrettably, the Related documents web part cannot be used to display custom fields. Only general document and node fields can be displayed. Anyway, I have set it as a future requirement, so we will consider it for one of the next versions of Kentico CMS.

Best regards,
Michal Legen