[development] Node referencing

Earl Dunovant prometheus6 at gmail.com
Wed Nov 16 15:11:45 UTC 2005

You just need to get the nid of the main node into the creation of the
subordinate node typoes. How about using a query string to specify the
parent, like

node/add/B?mainnode=(nid of A)

or maybe

node/add/B/(nid of A)

Populate the new field in hook_form(). You can even choose to show an input
control for the field if it's not specified

On 11/16/05, Sergio <lsmoura at gmail.com> wrote:
> Hello, folks,
> I'm in need of a little help...
> I have a module with 3 types of node. Node A, B and C.
> I am trying to do something like A is the main node and B & C references
> A. So that, when I show the node A (teaser or full node), I get some
> informations about nodes type B and C that makes reference to A.
> Also, I want to node types B and C have a reference to the parent (A).
> When the user inserts the data, it must be transparent to him as who the
> parent is (like there is a link on node type A that allows the user to
> create type B or C and the node creation page will not ask the user who the
> parent is). The only creation method shoud be like this for nodes B and C
> (there should not have a link on the node creation list. Just for type A)
> I took a look at the project module, but I couldn't get much out of it...
> Any help is appreciated...
> Thanks,
> - Luis Sergio Moura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20051116/ec0de50a/attachment.htm

More information about the development mailing list