[development] hook_nodeapi vs. $form['#submit']

Khalid B kb at 2bits.com
Mon Jul 10 02:48:20 UTC 2006


I did something similar for a project a few months ago before 4.7
was released.

The nodes had one to many relations, in multiple levels, let us
call them parent (p), child (c) and grandchild (gc).

Each parent will eventually have one or more children, and each
child  will have one or more grandchildren.

In p, if the permissions are OK, a p_links() will show "add c",
and similarly, c would  show "add gc".

Each of those would be a link to node/add/c or node/add/gc.

In c, there would be a drop down list (#select) of all nodes of
type p (there are not thousands of them), and similarly, in gc,
there would be a drop down for type c. The creator of the node
selects who the  parent is.

Then nodeapi(view) for p, will call c_list(), which is in c.module.
Same idea for c and gc.

The modules' code is sort of intermingled, but that is OK for this
project.


More information about the development mailing list