Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link a content types field to the user profile

I would like to link the output of a field(say WRITTEN BY:Name) in the content type (say ARTICLE) to the user profile.

like image 967
Jack Avatar asked Dec 04 '25 18:12

Jack


1 Answers

You should take a look at Entity API and Entity reference.

Consider these modules over the references module (as stated in references module):

References will most probably be deprecated in the near future in favor of Entity Reference, which should probably be considered first on fresh D7 projects. Another, more radical, alternative would be the Relation module.

Update: Here are the required steps:

  • go to the content type manage fields page. e.g. admin/structure/types/manage/page/fields
  • Under Add new field section choose Type of data to store. to be Entity Reference and for the widget, select whichever works to you. Then click Save.
  • From the Field settings page, set Target type to User, then configure the remaining settings to fit your purpose and save the settings.

Hope this helps... Muhammad.

like image 85
Muhammad Reda Avatar answered Dec 07 '25 15:12

Muhammad Reda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!