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 » Extensions » Custom datatype
expandshrink

Custom datatype

Custom datatype

Saturday 09 October 2010 3:42:18 pm - 4 replies

Hello,
I'm having trouble creating a custom datatype. I create the right file structure, ini files, templates but it doesn't show in the dropdown when creating class attributes.
The main datatype class is developed by RAD option in administrator panel, and in my tpl files I simply added <b>Hello world</b>... I thought when this shows up, I will proceed from this point to some data collecting and processing, but I can't get it done.
Is the RAD created php file sufficient? - also, the simple tpl file which is supposed to say hello world? - the documentation for new datatypes is awful...

Sunday 10 October 2010 5:37:38 am

I have created a sample user exp datatype that you can check and build your own datatype ( just ignore the modules folder and modules settings ) , you can also check the tutorial about creating datatypes in ez 4.

The main problem is create the extension directory structure, the settings, and design files.

Remember to create all the necessary settings files in your extension settings folder.

You can always check some of the default datatypes code in the kernel/classes/datatypes folder.

Modified on Thursday 14 October 2010 1:28:45 pm by Thiago Campos Viana

Monday 11 October 2010 9:23:25 am

Hello

I'm currently working on an updated and comprehenseive tutorial about datatype development. But this is a long job...

As Thiago mentioned, check the tutorial Creating datatypes in eZ Publish 4. You might skip the validation steps with UserInput component to be easier to apprehend for a start.

You can also ask questions on the forum if you're lost happy.gif Emoticon

Monday 11 October 2010 10:46:47 am

Hello,
I'm having trouble creating a custom datatype. I create the right file structure, ini files, templates but it doesn't show in the dropdown when creating class attributes.
The main datatype class is developed by RAD option in administrator panel, and in my tpl files I simply added <b>Hello world</b>... I thought when this shows up, I will proceed from this point to some data collecting and processing, but I can't get it done.
Is the RAD created php file sufficient? - also, the simple tpl file which is supposed to say hello world? - the documentation for new datatypes is awful...

Hi Ivan, some basic things to check:

1) Did you enable the extension (in the override of site.ini) that declares this datatype?

2) Did you set the proper settings in override of content.ini:

[DataTypeSettings]
ExtensionDirectories[]=your_extension_directory
AvailableDataTypes[]=your_datatype

?

3) Did you clear the cache?

Thursday 14 October 2010 11:38:33 am

I have created a sample user exp datatype ( I will change this link to the projects site ) that you can check and build your own datatype ( just ignore the modules folder and modules settings ) , you can also check the tutorial about creating datatypes in ez 4.

The main problem is create the extension directory structure, the settings, and design files.

Remember to create all the necessary settings files in your extension settings folder.

You can always check some of the default datatypes code in the kernel/classes/datatypes folder.

Thank you very much, this helped a lot.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from