Views Contextual Filters: Using node's URL alias as a conditional filter I have Drupal content whose nodes have URL aliases;

/node/1 routes to /bar

I also have a View which passes a NID as a contextual filter:

WHEN THE FILTER VALUE IS NOT AVAILABLE:

[selected radio] Provide default value

TYPE

[selected dropdown] Raw value from URL

PATH COMPONENT:

[selected dropdown] 1

[checked] Use path alias 

View's Path is set for /foo/%

So:

/node/1 returns node

/bar returns node

/foo/1 returns view

/foo/bar returns a white screen

How do I allow the View to access the node's URL alias as a conditional filter?

Thank you
Maybe the View Url Path Arguments module. I am seeing it recommended in this thread, but I'm really not sure if that's your issue or not.

Alternatively, you can implement hook_views_pre_view and alter the argument passed to the view based on the value in the url, i.e. do the conversion from alias to id manually. If you have an issue when your alias contains a /, an alternative may be to use a query string for the contextual argument.