This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Attribute class automatically fill...

Attribute class automatically fill when object is created

Attribute class automatically fill when object is created

Monday 18 July 2011 3:08:36 pm - 2 replies

I would like to know if is it possible that when user creates a new object of a class, this object gets the value of a class attribute automatically. I mean: the user creates an object that have "number" attribute, "title" attribute and "descripction" attribute, is there a way to give the object's "number" attribute automatically a value? The first created, must be 001 (for example), the second, 002; the third, 003; this attribute will increase +1 at each new creation...

Monday 18 July 2011 3:24:17 pm

Hi Albert,

If you just want to increment an attribute on each object creation you can add an identifier attribute to your content class and eZ Publish will do the rest automagically blunk.gif Emoticon


Modified on Monday 18 July 2011 3:24:35 pm by Damien Pobel

Monday 18 July 2011 3:36:04 pm

Hi Damien,
I am ashamed, it was so simple... I didn't know ant test either this class attribute.

Thank you for your fast response.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from