Retreive info on a Content ID from another item

We create a content type (Professor) where one of the field (Department) is a DropDown on another content type (Department Content Type). In that field, we store the contentid (ContentID of a Department Content Item).
In my template (Prof Template) I want to retreive the displaytitle and the URL of the ContentID I’ve stored (Department Item) in the content item. What I want is to have the displaytitle as link of the Department in the Professor Template.
How can I do that ?



One simple way to do this is the build a JCR Query that selects the item based on the content id (select rx:sys_contentid from nt:base where rx:sys_contentid = :deptid) and then use a normal autoslot.

This isn’t terribly efficient, but it will work. You could also write a JEXL function in Java to load the “Node” (call IPSContentMgr.findItemsByGUID()), and the replace it in the current assembly item (see this post:

Of course, having IDs in fields is a little dangerous: what happens when you replace a “Department” or split a departments in two parts? You don’t have any relationships in the database to help you find all of the modified documents.

This is why we frequently “build relationships” for these items rather than storing ids.


Hi Dave,
I thought about all your suggestions. What I understand is the best way to do what I need is to build a relationships ?
We never did that so I’ll have to read about how to do so and how to use it. Is the documentation “Implementing the Relationship Engine” is the right documentation to read ? Is there any advice we should know ?
And I read in the forum about a Relationship builder package, would we need that to do what we want ?