node_type_info() and node_type_save() accept a different range of attributes. node_type_save() matches the node_type table but not the Add content type page. I like the use of an object in node_type_save().

node_type_info() should be expanded to handle everything defined in node_type_save(). Add custom, modified, and orig_type or document their use. Is orig_type for converting from aaa to bbb or for helping bbb inherit from aaa? Either way, a module could use it through node_type_info() when the module is expanding. Think of a module named Web. It creates note types named web. Along comes module Web 2.0 to add extra features. Web 2.0 wants to convert nodes of type web to nodes of type web2. orig_type seems to fit somewhere in there but is not available to modules through node_type_info().

The workflow default options and default comment settings would both be useful at the module level. Can they be set in a module's .install or could node_type_info() be enhanced to set them?

The node_type_save() object approach is a good idea. Create the object in the module and pass it to node_type_info(), the same as for node_type_save. If there is common stuff needed in the class then node.module could define a class to be inherited into the module's node-type class.

Outside of a few inconsistencies, this module level node type is good stuff. It is simplifying some of my modules without the need or overhead of CCK.

Comments

mdupont’s picture

Status: Active » Closed (won't fix)

No further devlopment on D5. Closing.