[drupal-support] node programatically creating other nodes?

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Sun Aug 7 12:07:08 UTC 2005



On Sun, 7 Aug 2005, Jim Tittsler wrote:

> Is there an example of module that creates/deletes other nodes?
>
> I have a custom module that in some circumstances it would be handy
> if it could create 2 or 3 other (largely boilerplate) nodes in
> certain circumstances, and in others if it could delete 1 or 2 other
> nodes.  Are there examples of similar things I can study?

            node_delete(array('nid' => $nid, 'confirm' => 1));

is what you want.

Cheers,
	Gerhard




More information about the drupal-support mailing list