GetRelatedPagesByTwoHop

Top  Previous  Next

This method is used to find pages which are indirectly connected to this page via another page. For example: if there is an association connecting a person to a department then you can create a list of other department members by traversing the association representing the concept of "person works for department" in both directions. Example:

PageDataCollection people = helper.GetRelatedPagesByTwoHop(

  this.CurrentPage,                                                     // Current page represents a person

  "http://psi.networkedplanet.com/associations/departmenthasmember",    // Association type

  "http://psi.networkedplanet.com/roletypes/department");               // Traverse to the department this person works for

  "http://psi.networkedplanet.com/associations/departmenthasmember",    // Look at all asssociations of the same type on department

  "http://psi.networkedplanet.com/roletypes/member");                   // Traverse back to all the people who work for the department