Create and reference a new node from an existing node

manishgarg - September 30, 2009 - 04:48

Hi,

I have an existing content type called company. From the company I want to be able to create and refer to a new content type - sheetnode.
i.e. when I click on create new sheet, it should show the new sheet node in a new page and when I save it, the control should come back to the company page.

I looked at a few different modules including Popups: Add and Reference. The problem with Popups is that the sheetnode content type does not show up there. Moreover, I do not want this as a popup functionality. I want a simple solution where I can create a new node from within a node and it gets referenced from the existing node.

This looks like a basic requirement and after spending several hours I am not able to find a straight forward way to do this. Any help, suggestions would be appreciated.

thanks
Manish

me too

Gabriel Radic - October 20, 2009 - 10:33

Hi Manish,

This is something I need as well. Thanks for pointing me to http://drupal.org/project/popups_reference, that looks like a possible alternative.

-- GR

<?php$text = t('Add

seutje - November 4, 2009 - 15:56

<?php
$text
= t('Add sheet');
$path = 'node/add/sheet';
$options = array(
 
'query' => array(
   
'destination' => $_GET['q']
  )
);
l($text, $path, $options);
?>

doing that on say, http://www.example.com/node/27, that link will go to http://www.example.com/node/add/sheet?destination=node/27, which should present u with the sheet content type form, and after submitting that, it should bring u back where u came from

 
 

Drupal is a registered trademark of Dries Buytaert.