Relationship without Auto index or Slot

We are new to Rhythmyx and trying to make a relationship between two content items. The relationship needs to be required and can only have one selection. Basically the idea is pretty simple. We are building a product catalog with product info and Vendor info. The product needs to be “related” to the vendor so we can show some vendor information on the product page (as well as the standard link). The information that needs to be accessible to the product page would be used in multiple locations on the product page. For example, there are meta data values which need to be in the head and the vendor name and logo needs to be included in the body. There are also other various pieces of information used on the page. We cannot use Auto Index because of the publishing problem with performance. Slots do not seem appropriate for a number of reasons. Although, if there are work arounds for the problems with the slot, the slot mechanism could possibly be used.

Any ideas would be appreciated. Thanks.

John Blakie
Xilinx

It looks like I might be able to use binding variables to pull content from the other content type, but in looking through the methods which popup in workbench nothing looks like it would be able to give me a NODE which would then have all the content fields from the other content type. The $rx.db.get() can get SQL data, but I am not sure how to use this object to loop through the object to the values out. Is there some documentation available that would help point me in the right direction?

Thanks.

John

John,

To answer your second question first, there’s a function in the PSO Toolkit that returns the contents of a slot.


$slotparams.template = rffSnCallout
$slotcontents = $user.psoSlotTools.getSlotContents($sys.assemblyItem, "rffList", $slotparams) 

Note that this returns a List of IPSAssemblyItem objects. If you want the first Node:


$firstNode = $slotcontents.get(0).getNode()

I hope this helps

John,

What you need here is an explicit relationship, not a “lookup”. In Rhythmyx, this is what Slots are intended for. There are really 2 separate issues raised by your post: how to select the Vendor to link to the Product and how to build the Product template.

Obviously, Linking can be accomplished with the standard Slot interfaces (where you search for the Vendor to be linked). It’s also possible to use a dropdown control, but you’ll need to deploy the relationship builder code (which we are doing as part of your Taxonomy project). I recommend that you use the standard slot interface for now, and talk to me about dropdown controls after the Taxonomy code is deployed.

In the assembly template, you have 2 basic options, you can build multiple Vendor snippets and assemble each one where you need it. This does NOT require multiple slots (or multiple relationships), just pass the template as a parameter to the slot in each #slot macro.


#slot("vendor" "" "" "" "" "template=vendor1")
#slot("vendor" "" "" "" "" "template=vendor2")
#slot("vendor" "" "" "" "" "template=vendor3")

The other option is to use the getSlotContents method I outlined in my previous post in this thread.

Dave,

Ok. I see. So by using the drop down (through the relationshio builder) I can make the field required and only allow them to choose one. This then mitigates the drawbacks of the standard slot for this need and we get the benefits of using the slot. Perfect. Thanks.

I thought I had a problem with the solution, but I had a mistake.

Thanks.

John

John,

I’m not aware of any issues with multi-value fields and the slot tool. If you can post (or better yet, email me) a more complete stack trace, I can trace it down for you.

Also please confirm that this is a “multi-value” field and not a “child table”.

Thanks

Dave

David,

Thanks. My retraction must have passed your message on the way in. I actually had a mistake that I found.

Sorry for alarm.

Thanks.

John

David,

You mentioned before that I could use the relationship build code to populate the drop down list for populating the slot. Do you have an exmaple or docs that I can use to see how this is set up? We have the code set-up in our environment. Right now I simply have a regular slot with one record in it.

Thanks.

John

[QUOTE=jblakie;331]David,

You mentioned before that I could use the relationship build code to populate the drop down list for populating the slot. Do you have an exmaple or docs that I can use to see how this is set up? We have the code set-up in our environment. Right now I simply have a regular slot with one record in it.

Thanks.

John[/QUOTE]

John, I’ve been away for a couple of days and I’m having some computer issues, so I couldn’t get back to you right away.

The Relationship builder code package (which I thought we were deploying in your site) has this in it. Let me see where we are with this and get back to you (most likely via email).

Dave

What is this Relationship builder package. This sounds like what we need. We want to be able to create relationships based on fields in a content editor being filled out. Could you let us know more about this ?

Thanks

Sonal

The relationship builder is a piece of “PSOToolkit” code originally developed for the Rhythmyx 6.0 demo that extends the Content Editor.

A selection control (e.g. a drop down) is used on the content editor, but the actual value is stored as a relationship, not as data.

There are 2 components: an Input Translation that takes value from the control and creates the relationship, and a Post Exit that takes the relationship and turns it back into a selection for the control.

You also need a Lookup resource that returns the Content Id of the items you want to link to.

We’ve deployed this at a couple of customers so far. Because it’s fairly complex (there are several moving pieces that have to interact) I’d prefer to have this installed by our PSO team, but if there are customers who feel they are willing to take on the challenge, please send me an email.

In its current form the package requires Rhythmyx 6.1 or later.

Dave

Could you also use the rxs_BuildRelationshipsFromIds exit

Hi,

Just to get things straight in my head, is the Relationship builder package a standard package in the PSO Toolkit?

Thanks

Georgina

Georgina,

The answer to your question is that the PSORelationshipBuilder is not packaged directly with the PSOToolkit, it’s a separate package, but we’ve made it available to several customers, usually with PSO assistance.

There are a few complexities to this package. For example, it can build both relationships where the current item is the “Owner” as well as relationships where the current item is the “Dependent”, and you have to figure out which is the best approach for what you are trying to do. Also, the lookup mechanism can be a bit tricky.

As with many PSOToolkit things, if you run into trouble, Tech Support won’t really be much help, as they know very little about it. About the best you can hope for is that they will refer you to me. When I’m travelling (as I am right now) or working on some other urgent issue, it may be a while before I can get back to you. (Although I"m the “maintainer” of this package, I’m not the original author, so there may be a few things that I’ll have to research if you ask detailed questions).

If you have a situation where you need it, we should arrange to discuss it, either directly, or through you local PSO resources.

Dave

PS: as somebody pointed out earlier, there’s simpler “precursor” to this package in Fast Forward. It’s lacking the “input translation”, and it only works in one direction (and I believe it’s the wrong one for most applications).