Custom datatype

Author Message

Ivan Švogor

Saturday 09 October 2010 6:42:18 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...

Thiago Campos Viana

Saturday 09 October 2010 8:37:38 pm

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.

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Jérôme Vieilledent

Monday 11 October 2010 12: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 :)

Marko Žmak

Monday 11 October 2010 1: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?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Ivan Švogor

Thursday 14 October 2010 2: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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.