[development] No module-defined node types?

Karen Stevenson karen at elderweb.com
Fri Jan 5 14:58:31 UTC 2007

----- Original Message ----
From: Morbus Iff <morbus at disobey.com>
To: development at drupal.org
Sent: Friday, January 5, 2007 8:12:17 AM
Subject: Re: [development] No module-defined node types?

>> But how does one value-add a CCK field?  Or would you have to tell the user to 
>> add it and then select which field is the "start" and which is the "end"?  I 
>> don't know of a way right now.  That could be because there isn't one, or 
>> could be that I just don't know what it is. :-)  
>At the moment, that's the one million dollar question. I don't know if 
>anyone has figured out how to do the above, or how to programatically 
>create a CCK node type. I think we have some page/story node type 
>creation in Drupal 5.x's system updates, but I have no idea how well 
>that can be reapplied to CCK.
>Ideally, I'd love to see something like Views snippets,
>where you can export/import pre-created views.

The import/export feature has already been added (using the content_copy module that is now packaged with CCK) so you can create a custom content type and export its definition and import it into another installation using copy and paste. The only other thing that's needed now is to create a hook in content_copy that allows other modules to identify code that is available for import in the way that Views identifies default views and create a way in the content module to list those definitions so the user can select one of them. That's the easy part, getting the import/export working was the hard part, and that's done.

As to the option to identify a 'from' and a 'to' date in the date module, that's something I'm planning to add, but I'm still trying to figure out the best way to do it. And the value add is easy since you can now (in 5.x) add any CCK field to any content type.


More information about the development mailing list