0

Views 7x3x: I have two pages & a block in my view in this order:

[Page1] [Page2] [Block1]

Page1: path/%
Page2: path%/%
Block1: (no path)

I have the same contextual filter on all three, Page2 has a second contextual filter. My block is not appearing as expected. I have the block in the proper region without any restrictions in the block configuration.

In the contextual filter for the block, I've set it to hide the view if the value isn't present in the url. In the view preview, arguments produce results as expected. However in the live view, nothing shows up. (I'm providing the same filter arguments in the url)

When I change the contextual filter to display all results when filter value is NOT available, everything works as expected, but this isn't the behavior I want.

What else could be hiding my block/view?
Does the lack of a path for my block mean it can't see the argument?

1 Answer 1

0

You likely arent providing the argument to the view in any fashion it can use it. Try not hiding the view but echoing the args to the view title or header and see what you are getting. Please consider using panels module or providing default arguments to your view instead. This works if the arguments are simple like node/user/term id.

If you post more specifics about your actual conditions i can help.

5
  • I did make a header for the block & var_dump'd the $_GET and my arg is there? However it does make a little sense that my block doesn't know where to get the argument, cus it's only a block as opposed to a page.
    – Merrick
    Commented Feb 27, 2012 at 18:20
  • I found it! Followed steps outlined here: drupal.stackexchange.com/a/13681/5569
    – Merrick
    Commented Feb 27, 2012 at 19:53
  • Still curious if the order matters if anybody knows, I kinda don't think it does, but would like to know for sure.
    – Merrick
    Commented Feb 27, 2012 at 19:54
  • Thanks Michael for the answer! I didn't catch it the first time (in your answer) but I did get it working using a default argument.
    – Merrick
    Commented Mar 5, 2012 at 0:12
  • Happy to help bud. Commented Mar 6, 2012 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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