Skip to the content
Documentation

Object relations

No ratings yet

Summary

Stores relations to other content objects.

Properties

Name Internal name Searchable Information collector
Object relations ezobjectrelationlist Yes. No.

Description

This datatype allows the relation of multiple objects. The following screenshot shows the class attribute edit interface for this datatype.

Class attribute edit interface for the "Object relations" datatype.

Object attribute edit interface

The following screenshot shows the object attribute edit interface for this datatype.

Object attribute edit interface for the "Object relations" datatype.

 

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns either FALSE (if there are no relations) or an array of ezcontentobjectattribute objects.

Contributors

Comments (6 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Use undocumented site.ini setting to make it work like it used to

    Daniel Staver ·

    I just spent three hours trying to figure out why this function no longer allows you to upload new objects and edit existing ones after upgrading a large site for a client... Turns out it was changed on purpose and that there's an undocumented site.ini setting to make it work like it used to:
    [BackwardCompatibilitySettings]
    AdvancedObjectRelationList=enabled

  2. INI-based limitations for browse selection method

    Kristof Coomans ·

    If you choose the selection method "browse", you can configure which browse type has to be used with an undocumented setting in content.ini:

    [ObjectRelationDataTypeSettings]
    ClassAttributeStartNode[]
    ClassAttributeStartNode[]=240;AddRelatedImageToDataType

    Where 240 is the class attribute id and AddRelatedImageToDataType is the browse type (this type can be configured in browse.ini).
    If for a specific class attribute no browse type has been specified, AddRelatedObjectListToDataType is used.
    The Object Relation datatype uses the same settings, but the default browse type is AddRelatedObjectToDataType.

  3. minor typo

    Matthew Carroll ·

    The last paragraph should read:
    ...or an array of ezcontentobject objects.
    (The link target is correct.)

  4. content access didn't word that way

    Dag Sverre Seljebotn ·

    Tried accessing the ".content" of an ezcontentobjectattribute object in a design template, but it wasn't an array of ezcontentobjectattribute objects. Looking in other templates the best I figured out for now is that the following will allow me to iterate of the objects of an ezobjecrelationtlist:
    {foreach $myezattr.content.relation_list as $relation}
    {def $obj=fetch('content', 'object',
    hash('object_id', $relation.contentobject_id))}
    ...
    {undef $obj}
    {/foreach}
    Wondering if there's some fundamental thing I haven't understood here though...

Comments

Add a comment

Comments are read by a moderator before they appear.