By norti on
Hi people,
is it possible to get an automatic node reference when creating a new node ? I've got two custom node types: A and B. A is a parent node type, B is a child type. I want to put automatically a button or a link in every A node (how can I do that), which redirect me to "Create content->B node" page and automatically fill a CCK node reference field (or other field type) on this form, to A node?
Thank you for any solutions.
Comments
i wrote a module for a
i wrote a module for a similar task, see http://drupal.org/project/autonode. however this module is still only good for examining its code, i didn't manage to make it more abstract. right now its only working for airport codes (for my website http://www.airportcitizen.net).
on airport citizen i needed location nodes for the airports, and i wanted to have different reviews referring to the airports. this allowed me to create the map, without the need to display all the reviews, only the airports which have reviews. location nodes are created when a review is submitted about a new location, its details are coming from a table in the database.
i dont have much time for it for quite some time, but i think this gives you a direction. Also if you can wait, and could support me, i can start working on this after the FrosCON in Bonn, 25-26th of August, or maybe try to squeeze it into my time before that.
Or maybe is it possible to
Or maybe is it possible to give a reference in this way: First I create A node, then I create B node (by clicking "Add" link on A node: /node/add/Bnode/30 where 30 is an ID of A node), and finally new B node is referred to A node, and I'm able to print a View block on A node with all referred B node titles ???
yes, its possible
it is certainly possible, you have to create that link automatically though, for which you have to code some. moreover you have to fill the B node manually.