ibexa

Path

ez publish / technical manual / 3.10 / reference / datatypes / xml block / object embedding


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

Object embedding

The "embed" tag makes it possible to insert an arbitrary content object directly in the XML block. It can for example be used to embed images. Usage:

<embed href="" [class=""] [view=""] [align=""] [target=""] [size=""] [id=""] [custom_parameter="" [...] ] />

With this tag, embedded objects are inserted as "block elements". Such an element always begins on a new line when it is displayed. It exists in its own virtual box and is always followed by a carriage return (like if someone hit the "Enter" key after inserting the object). This means that, for example, inserting an image using the "embed" tag will break the current paragraph. The "embed" tag is represented by block-level tags in the resulting XHTML code.

The "embed-inline" tag makes it possible to insert objects as inline elements. For example, this tag allows you to insert an image inside a text line. Usage:

<embed-inline href="" [class=""] [view=""] [align=""] [target=""] [size=""] [id=""] [custom_parameter="" [...] ] />

This tag is represented by inline tags in the resulting XHTML code. The templates that are used for rendering "embed-inline" tags must not contain block-level XHTML tags.

The following table reveals the list of parameters supported by the "embed" and "embed-inline" tags.

Parameter

Description

Required

href

The "href" parameter must be a valid link to either a node or an object using the same notation as for hyperlinks (for example "eznode://134", "eznode://path/to/some/node" and "ezobject://1024"). If the provided link is a link to a node, eZ Publish will use the object that is encapsulated by that node. In other words, in both cases it is the object that will be inserted (the node notation is just a wrapper).

Yes.

class

The "class" parameter makes it possible to specify a custom stylesheet that should be used. In the template, the specified stylesheet will be available in the $classification variable.

No.

view

The "view" parameter makes it possible to specify the view mode that should be used when the object is rendered (for example "full", "line" and so on). By default, the system uses the "embed" view mode when rendering objects that are inserted using the "embed" tag, while the "embed-inline" view mode is used together with "embed-inline" tags.

No.

align

The "align" parameter can be used to specify the positioning of the embedded object; possible values are "left", "center" and "right".

No.

target

The "target" parameter can be used to set the opening method (same browser tab/window or new browser tab/window) for the embedded item (for example "_self", "_blank", etc.).

No.

size

The "size" parameter can be used to set the image size that should be used when an image object is embedded (for example "small", "medium", "large", etc.). The available sizes are defined by image.ini.

No.

id

The "id" parameter makes it possible to assign a unique ID which will be the ID attribute in the resulting HTML.

No.

custom parameters

The available custom parameters must be specified using the "CustomAttributes[]" array in either the [embed] or [embed-inline] block within an override for the "content.ini" configuration file. When used, a custom parameter will be available as a template variable with the same name as it was specified in the tag itself.

No.

Balazs Halasy (10/03/2005 11:49 am)

Julia Shymova (22/07/2008 9:40 am)

Balazs Halasy, Julia Shymova, Svitlana Shatokhina


Comments

There are no comments.