[development] creating new content type
Chris Johnson
cxjohnson at gmail.com
Wed Dec 24 18:23:31 UTC 2008
hook_insert and hook_update are hooks for node modules. If your new
content type is not going to store any data in the node table, it will
not be a node module.
Most new content types extend the node type. They may extend the
kinds and fields of data stored in the node table (and related tables,
such as node_revisions) with their own database table. This is when
you would use hook_insert and hook_update, so insert and update your
table whenever the corresponding records in the node tables were
inserted or updated.
Take a look at the node_example.module:
http://api.drupal.org/api/file/developer/examples/node_example.module/6/source
..chris
On Wed, Dec 24, 2008 at 7:08 AM, Aldo Martinez Selleras <aldo at caonao.cu> wrote:
> you want to say, if i use taxonomy, can't use by example, hook_insert,
> hook_update, and others?
>
> if this module i'm developing, do not need exactly the node database, what can
> i do for this, if all the data it's saved in my table.
>
> can i save in node table, just title and any other thing in the body record?
>
> what i have to do for the option Edit work for my module??
>
> --
> ----------------------
> Aldo Martinez Selleras
> Administrador del Nodo
> CITMATEL GND Camaguey
> Tel: 32-291661
> E-mail: aldo at caonao.cu
> Linux User #364356
>
More information about the development
mailing list