Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand you correctly</p> <ol> <li>You have 2 content types. <code>Book</code> and <code>Contributor</code></li> <li>The <code>Book</code> content type has a node reference field which points to nodes of type <code>Contributor</code></li> <li>There can be three kinds of contributors: Author, Seller and Reader</li> <li>From the Book content type you want to be able to select the contributor (via Node Reference) and mark the the contributor type as reader, seller, author etc. (In some ways you want to add an "attribute" to the Node Reference or "describe" the Node Reference)</li> <li>Also this way its possible for a contributor to be in more than 1 category. e.g. A contributor can be an author and seller also.</li> </ol> <p>Actually your question, if I have understood correctly is a good one. The answer is not trivial.You need to somehow "group" the node reference field with a select list. This way <em>every time</em> you make a node reference, you also select the contributor type. What you're asking for essentially is "Multigroup" feature. Its available only in CCK version 3.You cannot do this with CCK Version 2 series which is what you're probably using. Unfortunately a stable version 3 of CCK is still not available. However a development is available at <a href="http://drupal.org/node/484068" rel="nofollow">http://drupal.org/node/484068</a> . As of today, a lot people are using this version already (see <a href="http://drupal.org/project/usage/484068" rel="nofollow">http://drupal.org/project/usage/484068</a> ) and from what I've read, its quite stable already.</p> <p>So in summary:</p> <ol> <li>Install CCK 3.x-dev from <a href="http://drupal.org/node/484068" rel="nofollow">http://drupal.org/node/484068</a> in your <code>sites/all/modules</code> folder. Remove the CCK 2.x folder if it exists there. Please take backups etc. of your site -- just in case something breaks.</li> <li>Enable the Multigroup module (under the CCK module listing)</li> <li>Create a Multigroup lets call it <code>MG</code>. You can do this under Manage fields -> Add a New group (Select <code>Multigroup</code> from the dropdown) </li> <li>Create a Node Reference field to Contributor Nodes, lets call it <code>Link to Contributor</code>. Make sure the parent of <code>Link to Contributor</code> is <code>MG</code> (you can achieve this by grabbing the anchor and moving the field to the right, just like you do for a hierarchical taxonomy tree.</li> <li>Create a contributor type select list field with three options (Seller, Reader, Author). Lets call the field <code>Contributor Type</code>. Again, make sure the parent is <code>MG</code>. </li> <li>Now test this by trying to create nodes of type <code>Book</code>. You will be able to select the Contributor and the Contributor Type. To add more Contributors to a <code>book</code>, simply press the <code>Add More Values</code> in the Node Edit Form.</li> <li>For Views integration you need to install Views version 3.0-alpha3 or higher. You will need to add a filter under under the Content Multigroup group. </li> </ol> <p>And BTW since I found your question interesting, I've tried it out and it seems to work correctly for me! </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload