I have a node reference field in views contextual filter and need to filter the list of contents. Url path in views like "node/%/foo " working for me, but the node alias like "/alias/foo" not returning any results . Anyone please suggest for this.

1 Answer 1


"node/%" is a system path, not an alias. When you use the path "node/%/foo", Drupal looks for an alias of "node/%/foo", and doesn't find one. Next, Drupal will "bubble" your request up to the system menu handler at "node/%" with the path argument of "foo".

When you use the path "alias/foo", Drupal looks for an alias of "alias/foo" but doesn't find one. Drupal does not bubble up your request to "alias".

This is a long-winded way of saying that if you want an alias like "alias/foo", you need to add it yourself. There are many ways to do this, e.g. use rules.

  • Thanks for your reply @aaronbauman. Can you say how to set rule for this and it will be helpful if you say how to set node path "node/%/foo" to path "alias/foo" in views.
    – Dhinesh.ES
    Commented Jul 29, 2013 at 13:13
  • 1
    Leave your view path as "node/%/foo". Then, create a rule: whenever a path alias is changed or created for your particular node type, create an additional path alias with "foo" appended to it. I'm not going to describe all the components you might need to build the rules and views appropriately - that's too big a topic for this forum. You should check out Drupal Support message boards or Drupal IRC. Commented Jul 29, 2013 at 17:43

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.