ibexa

Path

ez publish / technical manual / 3.6 / reference / datatypes / identifier


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

Identifier

Summary

Generates a non-editable identification string.

Properties

NameInternal nameSearchableInformation collector
Identifier ezidentifier Yes. No.

Description

This datatype allows the automatic generation of unique identification strings for objects. An instance of a class that makes use of this datatype will have a unique identification string generated whenever the object is published for the very first time. The identification string is system-wide and may consist of the following elements:

  • User configurable start-text
  • Automatically generated identification number (configurable start value and number of digits)
  • User configurable end-text

The system will increment the actual counter(s) whenever a new object is published. It will not decrement and reorganize the identification strings when an object is removed. The identification strings are generated and maintained by the system and thus they can not be modified using the object edit interface. The identification strings are generated based on the class type and the identification number of the class attribute. In other words, the identifiers do not depend on the objects' locations within the content node tree. In addition, the datatype may be used to represent several attributes within the same class. The following screenshot shows the class attribute edit interface for this datatype.

Class attribute edit interface for the "Identifier" datatype.

Class attribute edit interface for the "Identifier" datatype.

Pretext

The "Pretext" parameter can be used to specify a desired start-text (all characters are allowed) that should appear before the automatically generated identification number. In the example above, the text "ABC" is used. This means that the identification strings generated for instances of this class will start with the letters "ABC".

Posttext

The "Posttext" parameter can be used to specify a desired end-text (all characters are allowed) that should appear after the automatically generated identification number. In the example above, the text "XYZ" is used. This means that the identification strings generated for instanced of this class will end with the letters "XYZ".

Digits

The "Digits" parameter makes it possible to insert additional zeros in order to generate equally long identification strings. In the example above, the digits parameter is set to "2". This means that numbers below 10 will appear with a prepended zero: "01", "02", "03"..."09". If the parameter was set to "3", the system would generate "001", "002" and so on. The "Digits" parameter can not be used to set the actual range / stop value. It only makes it possible to prepend the actual number with zeros.

Start value

The "Start value" parameter can be used to specify a desired start value for the counter; the default value is zero. In the example above, the value "1" is used. This means that the counter will start at "1". Given all the parameters above, the identification string generated for the very first object will be "ABC01XYZ".

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns a string containing the actual identification value.

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

Balazs Halasy (29/04/2005 1:48 pm)


Comments

There are no comments.