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

eZ Community » Forums » Developer » Own Datatype - Filling custom values...
expandshrink

Own Datatype - Filling custom values in class edit tpl

Own Datatype - Filling custom values in class edit tpl

Monday 17 March 2014 10:09:41 am - 2 replies

Hello folks!

I recently create my own datatype so extend the ezobjectrelationlist. I copied all needed files (the datatype class, the datatype edit tpl and the datatype view tpl), changed everything I need to change and added my own class attributes. Everything works fine expect of one thing I cant figure out why:

Everytime I edit the class, my custom attributes will be set to default!

For example:
My custom objectrelationlist has the custom attribute "allowed filetypes". It's a string like ".jpg, .png" and when I edit my class, fill in the input field for "allowed filetypes" and publish the object its stored and in my datatype view.tpl its shown correctly. When I edit it again, it will be set to default, not the value I filled in before.

I have scrolled through the code like 100 times, edited and changed everything I need and could find, but I don't get my prefilled values!

I hope someone could help me with this problem!

Wednesday 19 March 2014 3:06:52 pm

Have you updated the defaultObjectAttributeContent() method?

Thursday 20 March 2014 8:42:44 am

Quote from Betsy Gamrat :

Have you updated the defaultObjectAttributeContent() method?

Yes, I have! I set it to the default values I expect for this attribute. My attribute then, when I edit it, gets these values I set there. The default values for the objectrelationlist will be overwritten.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from