0

I have a Views Page that displays content from articles matching a particular criteria. That views page works as expected.

I also have a views block that is supposed to pull related content from the article (think taxonomy, but I am using content types instead). I have placed this block on all pages (no exclusions) on the right sidebar (Garland).

My content URL paths are set up as such:

example.com/section/page-name

My views page is set up as:

example.com/section

When I access the article directly via .com/section/page-name, the block shows up properly with all of the correct relevant links. This means I have configured my relationships and context filters correctly.

When I hit my views page and render the content there, the content gets rendered, but the block never shows up. (Just for grins and giggles, I put a test block with some garbage and it shows up every time; views page and article)

I am assuming it is due to passing a filter or something in the URL, but I am just assuming and even if I was right, I have no idea how to pass that info to the block so that it gets rendered.

A point in the right direction here would be greatly appreciated!

  • What is the contextual filter you are passing to the block? You need to explain more. getting context into blocks is difficult and you probably will need to look at page manager and panels or a bit of custom coding, like a views hook wherein you pass the context manually. – J. Reynolds Jun 9 '15 at 5:00
  • Actually, I was able to get it working basing it off what limecake answered..it turned out to be a combination of how my view was configured (path) and how I was rewriting output of the view to generate the links that pass arguments to the view. – Allan Jun 9 '15 at 13:12
0

This sounds a little like it's due to your contextual settings. Not sure if you set these based on some info you found on the net, but the settings given online can lead to your view block not rendering content because you are currently looking at that exact content to begin with.

The thought behind this is for example if you load a bunch of articles of the same content-type, that it will not list the same article in that list etc.

What you CAN try is to go into your views block (which is causing trouble) and under "advanced" set a simple "Global Text" under NO VIEW RESULTS BEHAVIOUR saying something like "Cannot load" or similar, to look if the block loads now with that message. If that is the case then the issue is more than likely in your contextual filters or in the field filter settings.

  • I was able to get it working by experimenting with this and found that it was a combination of my view and how I was rewriting output generating the link to pass arguments to the view. Thanks for the point. However, I still have no idea why this doesn't work with aliases, but works with just node numbers. – Allan Jun 9 '15 at 13:14

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.