Forum OpenACS Development: Re: relational segments: how do you use them

Posted by Tom Jackson on

Lars, thanks for the tcl translation of all the hooie I went through above. Wow, the tcl api makes things simple.

Randy, note that there are two relational segments created above, although Lars only included the Admin segment.

On creating the rel_type:

A relation type relates two objects. The type specifies which object_type each object must be in order to allow the relation to exist.

In the case of making a rel_type for use by a relational segment, the further requirement is that the object_type_one must be a group_type, and object_type_two must be a derivative of a party. If the party type for object_type_two is a person/user or derivative, then the supertype will be membership_rel, otherwise you need a composition_rel.

In your case, it looks like you want a membership_rel.

The role_one and role_two must be chosen from what is in acs_rel_roles, but the data is essentially meaningless, you can leave them blank if you want.

Max_* you can leave blank as well.

I'll post my code for the examples I have been using, maybe today or tomorrow.