0

I have list of courses of course content type in a view. I want to add "add course" button with every listing of node in view. When a user is logged in he can add a course to its profile information. so that profile information shows all the added courses from view in the profile. For example: List of courses taken by user. I have used entityreference module to attach nodes to user profile. But I have no idea how to do it from a view listing.

How do I add a node from a view to user profile field?

  • I don't understand your question, so I am just guessing here. In views, under advanced, maybe you need to add a relationship of referenced or referencing. – No Sssweat Jul 29 '16 at 22:57
  • It is kind of add to cart button for products. I have to show in profile information of user that this user has taken these courses. – He-mant Kr Jul 29 '16 at 23:11
  • What do you mean by View Listing? – Gulok Jul 30 '16 at 3:18
  • Means how to add a button with every listing of node in a view. Exactly like add to cart which adds product in a cart. I want user to select courses in a view and add to their profile information. – He-mant Kr Jul 31 '16 at 10:36
0

You can simply add a Global: text area in views header and input below HTML in the content.

<a href="/node/add/course">Add Course</a>
  • I think I was not able to explain myself clearly. I don't want to add course node. I want to add already listed courses to profile information of user. If a user add courses from view it should show under the profile information of user. For example list of courses taken. – He-mant Kr Jul 29 '16 at 22:16
  • 1
    I feel confused. Can you update your question to clarify? Thanks. – Jimmy Ko Jul 29 '16 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.