Hi,

I have a set of nodes of type A. I want a user to be able to select one of these nodes by clicking on a link. Then, a node of type B must be created which depends on the content of the selected node of type A.

Please give me your suggestions to do this using the rules and views modules. I am not a developer, so I want to do this with as little code as possible.

I created a view of type A nodes. The view contains a link to each node. I did this with Global: Custom Text. When I click on this link, the node is going to be viewed. In a triggered rule on the event "node is going to be viewed" I can create new content of type B, based on the available content of type A.

I want to execute this action only when the node is going to be viewed triggered by the link in the view. That is why I used a custom text link: I can append some text to the url that can be used to distinguish a normal call to view this link.

I need some help to:

* create a condition in rules that tests if the url contains the special characters or text that was added in views.
* or to do this in a different way

Your help will be very much appreciated.

Comments

Goofy2k’s picture

Hi,

I found a module to do this job. It is Node Reference URL widget. With this module an additional widget is added to the CCK Node Reference filed. When content with a node reference field is created, the nid of the referenced node can be passed via the url that initiates creation of the new content.

See: http://drupal.org/project/nodereference_url.

I compose the url in a view of the refering node types.