Skip to the content
Documentation

Object relation

No ratings yet

Summary

Stores a relation to a content object.

Properties

Name Internal name Searchable Information 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.

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.

Raw output

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

Contributors

Comments (7 historical)

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

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

    Nathan Kelly ·

    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!

  2. INI-based limitations with 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, AddRelatedObjectToDataType is used.
    The Object relation list datatype uses the same settings, but the default browse type is AddRelatedObjectListToDataType.

  3. Exemple of raw output of an object relation attribute to an image

    Mike LECOMTE ·

    {$node.object.data_map.my_objetc_relation.content.data_map.image.content[original].full_path}

    1. Re: Exemple of raw output of an object relation attribute to an image

      Squeegie ·

      what is ".my_object_relation." in the raw output ?????
      Thanx

      1. Re: Re: Exemple of raw output of an object relation attribute to an image

        André R. ·

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

Comments

Add a comment

Comments are read by a moderator before they appear.