0

I have a basic page named as news.

Now i have created a two blocks from view in page news

Block 1 is block of taxonomy

Block 2 is having Contextual Filter with term id

I have assigned these block to news page as

news

news/*

Now when i am accessing

example.com/news only Block 1 is coming which is fine

when i am accessing

example.com/news/1

Block1 is coming and an error

Requested page could not found

I want block 2

How to do this enter image description here

Please

Thanks

2
  • Check your settings for the contextual filter, specifically the validation settings. Are you sure you have a taxonomy term with id 1? Check the taxonomy term override view for reference.
    – 2pha
    Oct 7, 2014 at 4:42
  • yes, still not working
    – Hitu
    Oct 7, 2014 at 4:51

1 Answer 1

0

Block views don't automatically pull in contextual filter values from the URL.

So to make it work you need to configure the "When the filter value is NOT available" setting to be "Provide default value".

Then you get some more options appearing below, where in the "Type" field you can select "Taxonomy term ID from URL".

Then configure the other settings as required.

[EDIT]
Note that term ID from URL only works from either a node page (node/NID) or a taxonomy term page (taxonomy/term/TID) or an aliased path for one of the pages.

If you want o do it with some other random page use the "Raw value from URL" option for the "When the filter value is NOT available" setting, then select the position in the URL that your parameter is (in your case 2).

3
  • i have done this, i have attached screenshot. still not working
    – Hitu
    Oct 7, 2014 at 4:48
  • Your screenshot says you are using the "Load default filter from term page" option. Is your news page a taxonomy term listing page (is it an alias of /taxonomy/term/TID)?
    – rooby
    Oct 7, 2014 at 5:41
  • Edited my answer with info about "Raw value from URL" option.
    – rooby
    Oct 7, 2014 at 5:45

Your Answer

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

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