I would like to display Content Profile fields (Full Name, brief bio, etc.) in a node along with the normal node content. I.e., a Article is created, and the author name and bio is displayed as well. I was hoping to do this by using the CCK user reference field. I would like the content creator to be able to simply select a contributing user from a list, and then the Content Profile information will be automatically displayed based on the UID.
How do I do this in content templates? I.e., how do I print a Content Profile field (like "field_display_name") based on the selection of a particular user?
Thanks,
Maria
Comments
Comment #1
fagohm, use a node reference field instead - you can use auto nodetitle to let it have right titles or a view. Then select a option to show the content of the referenced node. I don't know if there is such an option, but that's the way it would work easily.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
KHofmeyer CreditAttribution: KHofmeyer commentedHas anyone figured out a way of doing this. I have tried node reference but don't see how to make it work?
Comment #4
jjemmett CreditAttribution: jjemmett commentedI would like to know how to do this as well. I did many searches on google and the various drupal user groups, but there is no current solution.
Comment #5
dogboy72 CreditAttribution: dogboy72 commentedI think the http://drupal.org/project/viewfield module would do this pretty easily. Add the viewfield to the content types that need a bio and pass %author or %nid to a view to extract whatever field you want from the user's content profile.
I'm going to try this in a few days - I let you know if it works. I can't imagine why it wouldn't.
Comment #6
sbydrupal CreditAttribution: sbydrupal commentedDogboy72, Did it work? thanks
Comment #7
dogboy72 CreditAttribution: dogboy72 commentedYes it did. I am not using it yet because the author's bios have not been completed.
Comment #8
alphex CreditAttribution: alphex commentedOf course viewfield is still in Dev.
/me dives in
I need a solution to this also.
Comment #9
alphex CreditAttribution: alphex commentedviewfield white screened my install... maybe I'll wait a while for that module...
Comment #10
ace11 CreditAttribution: ace11 commentedOld thread but any solutions? Would like to know how to do this in D7.
Comment #11
KrypticBit CreditAttribution: KrypticBit commentedOld thread, but I'm looking to do the same in Drupal 8. Did anyone figure out how to do this with entity references?