phpdrupal-6cck

CCK node reference url field in drupal


I have two content type in cck

  1. Job

  2. Applicant

I have created a node reference field to job field type as link.

Now I want that when some one click on particular job then the link should be seen even when person is not logged in.

Currently logged in user can see this link.

Note : When user not logged in then link should go to login page not to applicant form.


Solution

  • Have you tried the Node Reference URL Widget http://drupal.org/project/nodereference_url ?

    From their description:

    The Node Reference URL Widget module adds a new widget to the Node Reference CCK field type. It auto-populates a node reference field with a value from the URL, and does not allow this value to be changed once set. It can automatically provide a link on the referencing node types, that will contain the proper url to prepopulate the field.

    I'm using it in a site where only certain users can add an event to a venue (my config is per role). You can use (in your nodereference field setup) a view to filter which nodes can a user reference (for example, in my case I use a view which filters venues per node author, so the user can only add events to the venues he is author of).

    To solve the login redirect you should try the Redirect 403 to User Login http://drupalmodules.com/module/redirect-403-to-user-login

    I hope it helps Cheers!