How to use URL as a filter in view module? I asked a question here and now I am going to create a view that the view take the URL and use it as a filter.



and I want to have a the view by a dynamic filter use the URL path and show the result by different type something like sport, economy, etc.

Pathauto: news/[node:news_type]/[node:title]

I want to use [node:news_type] in my filter
You need to add a Contextual filter under the Advanced pane in your view's edit page.


Look for your field, it would probably be Content: News type then add the field
Under WHEN THE FILTER VALUE IS NOT IN THE URL select Provide default value
Choose Raw value from URL for Type
Choose 2 for Path component
Check Use path alias