I have a View which uses contextual Filter to compare my URL last Argument with Taxonomy term. This Works when my view is Page but doesn't work in block mode. This is my View Below. This is my View

Attaching my view and Site Description along this. My Pdf Category View is placed as a block. enter image description here When I Preview by entering the brand name emax in the view, it give me proper results but it doesn't fetch from url(RAW Value from URL). Correct me if i failed to mention anything wrong.

1 Answer 1


I found the solution for this issue. I used PHP code by selecting "Provide Default" and Select PHP code as below to extract arguments from URL and provide a filter to your view.

$path = drupal_get_path_alias();
$path = explode("/", $path);
return $path[2] /* Since explode function return array of url arguments, select required arguments starting with 0.*/

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.