1

I have a block that displays results of the nodes i have created but i have those nodes on a specific path, anyway to put this short im trying to make a block from views that displays content based on the url it is on.

For example, if i am on page green, it displays all content from the path green/whatever or if im on red it displays content from red/whatever, im trying to achive this without making a bunch of blocks is there another module or something for this?

Any help is greatly appreciated.

  • I'm trying to do the same thing. Did you ever get an answer? – user2659 Aug 26 '11 at 14:09
  • Yes, under contextual filter you add Global: Null and Content: Has taxonomy term ID – Jeremy Love Aug 26 '11 at 15:31
  • If you would write an answer explaining what you have done, that would be good. The currently accepted answer doesn't explain how to achieve what you are asking. Writing as answer what you wrote as comment would be fine, if you expand it a little. – kiamlaluno Jan 8 '13 at 13:58
1

Please watch Learn Views with NodeOne, part 19: Contextual filters with paths.

  • ok thank you for the video it did help a little and i tried this in the beginning before posting here but im still kinda stuck, I selected Content: Nid and Display all results for the specified field, and it gives the results for everything when im on the home page of the site but when i go to lets say my url is chicken.com/cooking, the content still stays the same it doesnt show the other content thats under that path which would be something like chicken.com/cooking/blahblahblah, this post should show in the block, im not sure if im something wrong or what. – Jeremy Love May 3 '11 at 20:19
  • You would not want to choose "Display all results", that would display all the results. You need to use it to restrict the results. – tim.plunkett May 3 '11 at 21:21
  • well if i try anything else like Provide default value type Content ID from URL the results are 0 – Jeremy Love May 3 '11 at 21:41

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.