0

I am trying to make a view in which I have to show images from an image-field of an organic group content type. I have tried for many hours but I am unable to make it work. I am trying to explain the scenario:

I have a venue (organic group) content type. For each venue there is an image field which can hold multiple images. I want to show a list of images that belong to a specific venue. For that I have to make a view so that I can show a list of images belonging to that specific venue. I have used the following path string:

/group/%/images

Now what I want is that for example, I want to visit a "pizza-house" venue, then the path string of the view will be:

/group/pizza-house/images

Now on this page I only want to show images from multiple image-field that only belong to "pizza-house" venue (Venue content type contains that field). For achieving this, I have tried the following contextual filter and relationships as in shown the pictures but of no use :/ pic 1 pic 2 pic 3 pic 4 Please help me figure out what I am doing wrong? I am new to contextual filters and organic groups. Thanks in advance.

  • What does "pizza-house" stand for? Is it somehow related to the group? The contextual filter has to take its value from somewhere, and I would have thought you'd get it from that parameter in the path, but that won't work the way you've set it up. – Ollie Jul 6 '14 at 9:05
  • pizza-house is actually an URL-alias for the venue group type generated by pathauto. The main problem is that I am unable to figure out which contextual filter and relationship would I use to get correct results. I have updated the post with another picture, please check. – InspiredCoder Jul 6 '14 at 11:30
0

I had a similar issue and it took me hours to finally find this solution: http://drupaleasy.com/blogs/ultimike/2013/05/sneaky-previously-undocumented-views-feature

I know it's for overriding the title, but it worked for me when I wanted to display a certain content type in a view for a specific group based on what page I was on. I fiddled for quite some time with relationships and different combos. But, all you need is the contextual filter: OG Membership: Group ID with a default value provided (current OG group from context) and specify validation criteria (OG GrouP).

Hope this helps!

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.