0

I would like to pass path alias as arguments to a views page. I tried the two methods one and two but unfortunately this doesn't works.

What I want to do is, example.com/box/portfolio link should show the example.com/box/45, 45 is node of portfolio. My views page path is box/% and I used the arguments as Node Id.

enter image description here

  • is portfolio a title of a node? – awm Sep 17 '13 at 16:45
1

Looking into the Views Alias module, it does exactly what you need. Rather than making the change during the Views argument validation, this module will create a path alias to this View for every taxonomy term that can be an argument on the Views you select. Thus, example.com/box/45 can be accessed via example.com/box/portfolio, etc.

|improve this answer|||||
  • thanks for the answer, but the problem is box is not taxonomy term – Ashok KS Jul 11 '12 at 13:57
1

It sounds like you need to get the node ID (to pass as the "final" argument) from the URL given that the URL is box/% and the argument is a path alias (i assume this means that your node's has only one level (path-alias instead of path/alias)

You would need to use drupal_lookup_path instead of drupal_get_path_alias since the argument is already an alias.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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