ibexa

Path

ez publish / technical manual / 4.x / reference / datatypes / object relation


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Object relation

Summary

Stores a relation to a content object.

Properties

NameInternal nameSearchableInformation collector
Object relation ezobjectrelation Yes. No.

Description

This datatype allows the relation of a single object. The following screenshot shows the class attribute edit interface for this datatype.

Please note that this datatype takes care of a single object relation only, and doesn't consider any particular existing permissions or visibility states. If you intend to filter relations considering existing roles and permissions we recommend the use of fetch functions within view templates. This way permissions and visibility will be considered.

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

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

Object attribute edit interface

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

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

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

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns either FALSE (if there is no relation) or an ezcontentobject object.

Balazs Halasy (21/02/2005 2:40 pm)

Ricardo Correia (14/05/2013 10:11 am)

Balazs Halasy, Ricardo Correia


Comments

  • What are the "Default Selection Item" and "Allow Fuzzy Match" attributes for?

    Could you please expand the description of the "Object Relation Datatype" edit interface?

    I have tried using the "Default Selection Item" in the hope it would allow me to browse directly to the "Images" folder within the "Media" folder when inserting images into articles for example, but it didn't seem to work.

    Have I misunderstood the purpose of this attribute?

    Also could you explain what the "Allow Fuzzy Match" checkbox is for? What is "Fuzzy Matching"?

    It seems that some of the "New" documentation assumes the reader already knows almost everything about EzPublish, but for those of us who are new to EzP (or the concept of CMS) the under exemplified descriptions on some pages equate to quite a lot of time wasting searching for the answers elsewhere.

    I'm not asking for a bible and I'm not having a dig at all of the hard work that has gone into this documentation, I just think some more enlightened examples and descriptions would make EzP far more user friendly. On that note I think for the best part you are doing a great job on the Docs.

    Cheers!
  • INI-based limitations with browse selection method

    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, AddRelatedObjectToDataType is used.

    The Object relation list datatype uses the same settings, but the default browse type is AddRelatedObjectListToDataType.
  • Example code to fill an attribute of this datatype with PHP

  • Exemple of raw output of an object relation attribute to an image

    {$node.object.data_map.my_objetc_relation.content.data_map.image.content[original].full_path}
    • Re: Exemple of raw output of an object relation attribute to an image

      what is ".my_object_relation." in the raw output ?????
      Thanx
      • Re: Re: Exemple of raw output of an object relation attribute to an image

        its an example of the attribute identifier of an object relation attribute.