Posted by jlmainguy on May 24, 2012 at 6:41pm
Hi,
I was looking for a way to retrieve a custom field from a group in a view?
For example, I have my Group content type in which I added a custom field (say the «Group Color» field).
Then, I wanted to build a view in which I could show the current node's group «Group Color» field. I was able to retrieve the current node's group ID, but not the custom field.
I built the view showing any type of node and used the OG Groups relationships to ge the current node's group ID.
Anybody has an Idea on how to do this?
Thank you,
Jean-Louis
Comments
What version
Hi,
What version are you using? Jason.
Version
Hi,
I'm using :
Thank you,
Jean-Louis
Add field using group relationship
Hi,
I'm using OG 7.x-2.x, which I think is different than the version you are using.
However, I think you follow these steps.
Find the view organic group provides to display a users groups. I think it displays the Title using the organic group relationship.
Clone this view. Then, in this new view, I add the color field and use the same relationship.
Let me know if that works. Jason.