By Lloyd on
I am creating two different contact types. The first will be called companies and have a minimal number of fields - namely the name of the company. Then I'll be creating a "product" content type. One of the fields in the product type will be "company" - where I want the user to be able to select one of the previously entered companies in the "company" content type via a dropdown box.
I'm sure there's a way of doing this but I kept running into issues when trying - namely that I couldn't figure out how to use an existing non-CCK field from one content type in another. And the company content type was only using the title field since that was all that was required.
Thanks.
Comments
any thoughts please?
any thoughts please?
Interesting
I wanna know the answer for that too. Subscribe.
Anyone?
Anyone?
_
This is usually done with a nodereference field-- add a nodereference field to the 'product' content type that references the 'company' content type. Then, you can use views to mix and match info from both content types into a single display using 'relationships'.
But nodereference can only be
But nodereference can only be used with a CCK field, right? My original question is whether you can reference one of the default fields like Title. It seems like this is a known issue so I've resorted to requiring a duplicate CCK field.
_
Yes, but in order to reference the node title of another node, you need to relate the 2 content types with a nodereference field. Then, when you add that field as a views relationship you can reference any field from either content type. Or, if it's just a one-off situation you can do a node_load to load any node and get at it's fields that way.