Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have a view which has the path set to events/%, where the wildcard will the the nid of, for example, a department. The view will display all events for a particular department.

I want to be able to change the second nid argument to be an alias, such as events/programming. I don't see this option in the standard Pathauto settings. I found a module which almost does this (only for taxonomy terms), https://drupal.org/project/view_alias, but its only for D6.

Is ther anything for d7, and if not, what would be the best hook to implement to make this change?

EDIT: There was a suggestion to use the Extended Path Aliases module, but I was not able to get that to work properly, and requires you to hack core (or install hte PECL library). I found a different module, subpathauto, which seems to do the same thing with out core hacking and it also says that it works with views. It still didn't work, this is what happened:

Node path: node/24
Node alias: department/[nid]
View path: department/[nid]/conditions

Example alias: department/physical-therapy-department

When I use the url of department/24/conditions, I reach the view page I want and the filtered content is displayed. When I use the url department/physical-therapy-department, I reach the correct node page. When I use department/physical-therapy-department/conditions, I DO reach the view page, but it has no content. Clearly the system did not translate physical-therapy-department back to 24 for processing, and the view didn't work.

Does anyone know how to use this module properly?

share|improve this question
add comment

1 Answer 1

You can try using Extended Path Aliases module..

Project page says

Would you like your human-readable, SEO-friendly aliases to be carried through on all your tabs, links, Views, and blocks, on all your pages, not just on that single aliased base path? If so, then this little module is for you.

share|improve this answer
    
Have you used this module before? I am having a hard time figuring out how to use it. For the moment, I followed the instructions to hack the path.inc file, but where do I set the alias? –  user1015214 Mar 25 at 17:45
    
I tried to use the subpathauto module instead, and I still was not successful. I edited my post above. –  user1015214 Mar 25 at 19:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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