ibexa

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

Related objects

The "Related objects" window in the object edit interface makes it possible to relate other objects to the one that is being edited. Any type of object can be connected to any other type of object. This feature is typically useful in situations when there is a need to bind and/or reuse information that is scattered around in the system.

For example, the concept of related objects makes it possible to add images to news articles. The images can be stored as separate objects outside the article. They can be related to the article and used from within the attributes of the article itself. This approach is quite flexible because it does not enforce any limitations when it comes to the amount and the type of information that is to be included. Please note that if you link to another object (for example you insert a link to a product page in a news article), the object that you link to will be related to the one that is being edited.

The following image shows the "Related objects" window when relations have been made.

Related Objects

Related Objects

The screen-shot indicates that the object which is currently being edited makes use of three other objects. Related images are displayed as thumbnails. Related files will be displayed with additional information (file type and size). All other objects will be displayed as the one in the "Related content" list as shown in the screen-shot above.

The check-boxes and the "Remove selected" button can be used to remove the relations. Please note that it is only the relations that will be removed and not the objects themselves.

The embed links can be copied and pasted into attributes that are using the XML block datatype. For example, if you relate images to an article and would like to have them displayed somewhere in the text, you can just copy & paste the suggested links into the body of the article. Please note that this process becomes much more simple when the Online Editor is installed.

The "Add existing" button makes it possible to browse the node tree and select multiple objects that should be related to the one which is currently being edited. Depending on the user's permissions, the browse functionality will allow the user to select objects located in different parts of the system (Content, Media, Users, etc.). The following image shows what happens when the "Add existing button" is clicked.

Adding Existing Objects

Adding Existing Objects

 The image above shows the main area of the browse interface. This interface makes it possible to select objects that have been placed somewhere in the node tree. Please note that in addition it is possible to use the first three tabs (Content, Media and Users), the path, the left menu and the bookmarks section for navigation.

Note also the inline search function that makes it possible to search directly for objects to relate to the article/object you are currently working with.

The Inline Search Function

The Inline Search Function

 The "Upload new" button makes it possible to upload new content to the system and automatically relate it to the object that is currently being edited. This button is typically useful when you for example want to relate an image that has not yet been added to the system. The following image shows what happens when this button is clicked.

Uploading New Object

Uploading New Object

The "Choose File" button allows the selection of a file for upload from the local file system. The "Name" field allows the user to set a custom name for the object being uploaded. The "Location" drop-down makes it possible to control where the uploaded file should be placed in the node tree. The "Automatic" setting will let eZ Publish decide the location based on the extension and/or the MIME type of the uploaded file.

When the "Upload" button is clicked, the file will be uploaded to eZ Publish. The system will create an object, the type of the object will be determined using the extension and/or the MIME type of the file. Finally, the object will be related to the one that is being edited and thus it will be visible in the "Related objects" window.

The "Cancel" button aborts the operation and brings the user back to the object edit interface.

Adding related objects as children

When uploading new related objects, you can place them beneath the object that is currently being edited. This can be done by selecting the object's name from the "Location" drop-down in the upload dialog. However, it can only be achieved if the parent object has already been published (otherwise it does not appear in the content tree and can not have any sub items). For example, if a new article is created as a draft, it will not be possible to add related images as children until the draft is published. The following steps demonstrate a solution to this problem:

  1.  Publish an unfinished article as hidden node.
  2.  Re-edit the article and upload related images as children.
  3.  Reveal the article when it is finished.

This procedure can be optimized by checking the "Back to edit" check-box located in the bottom of the object edit interface (refer to "The object edit interface" section for details).

Geir Arne Waaler (12/01/2012 1:59 pm)

Andrea Melo (02/11/2012 8:52 am)

Geir Arne Waaler, Andrea Melo


Comments

There are no comments.