I have a few pieces to my existing puzzle:

  1. Node Type Snippet
  2. View with Block Display called Snippets Block
  3. A context rule to put the Snippets Block inside a container page

How to I tell a Views Block to only pull Snippets belonging to the same OG as the container page?

To start:

I've created the following relationship and contextual filter, but the containing page doesn't show the expected node teasers.

enter image description here enter image description here

Node Type's Fields: enter image description here (view larger)

Current View set up: enter image description here (view larger)


As fullerja said, you can use a Contextual Filter but you may also need to define a Relationship first so that the view pulls in the OG that goes with the snippets.

If this page is showing OG content, hopefully it has the OG's slug in the URL. If that's the case then you can use that path for the Contextual filter.

These answers might be helpful for the specific configuration:

  • 1
    Well, definitely an up vote. I updated my question a bit. Am I getting closer?
    – Rick
    Apr 17 '15 at 21:37
  • I'm not sure if the contextual filter will get the argument from the context as you have set it. If that doesn't work, try selecting "____ from URL" (options depend on what you are working with). I'm sorry I haven't used OG in a couple of years and I don't a site I can try it on.
    – R. Durham
    Apr 23 '15 at 16:14

You should be able to create a 'Contextual Filter' and use the context of the OG group.

Look at using the group ID as the filter. Once you get into the config for the filter, there should be an option for getting the argument from context.

  • See i.stack.imgur.com/2hD6B.png I'm unsure of how to set up such a filter. I'm unsure of which of the available ones to try and why.
    – Rick
    Apr 17 '15 at 16:02

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.