Introducing View Alias Module

Posted Jul 10, 2008 // 5 comments
Eric :

Finally got around to pushing this out. I’ve been thinking about it for a bit, and it just started as something to help me quickly generate url aliases. But after using it on two projects I thought some others might like it. druplicon_small_0.gifFinally got around to pushing this out. Finally got around to pushing this out.

I’ve been thinking about it for a bit, and it just started as something to help me quickly generate url aliases. But after using it on two projects I thought some others might like it. The module grew out of the need to have search engine friendly URLs for view driven listing pages. And by “listing pages”, I mean a view that’s displaying all the nodes that are marked with the provided term argument, i.e. articles/88 should be articles/software-news . The module has two features – bulk generation and recurring maintenance.

Bulk generation is a one shot, create or delete style feature. It creates or deletes all the aliases for a view in one action. The recurring maintenance aspect is to help with the inevitable occurrence of taxonomy name changes. You can visit the Drupal.org project page to download or add comments, questions, bug reports, etc.

About Eric

Since 2006, Sofware Engineer Eric McKenna has been building with Drupal and, so far, he has actively strengthened its corresponding community thanks to his congenial support and solid module contributions. (Plus, he has actively committed to ...

more >

Read Eric 's Blog

Comments

by merlinofchaos (not verified) on Fri, 07/11/2008 - 14:08

pathauto?

Is this really just an extension of pathauto (that is desperately needed)? Would it be possible to put this functionality into pathauto properly so that things like Panels can benefit from the same technology? I suspect that’s a fair bit of work, though at the end of the day the community would really benefit.

by Jacob Singh (not verified) on Mon, 07/14/2008 - 02:15

Hey guys, so ironic, I

Hey guys,

so ironic, I just did the same thing yesterday. Our problem is that we are using panels2 everywhere, and the client wants “mini-sites” like:

/campaigns/bushmeat
with:


// $args // for each arg // remove the arg and see if the path that is left is in path auto // example: // campaigns/mycampaign/blog/superblog // first loop: // is campaigns/mycampaign/blog in the alias table (no). // second loop: // is campaigns/mycampaign in the alias table (yes) -> node/123 // set the path

$arguments = explode(’/’, $_GET[‘q’]); // Only limit this to a couple of url paths to keep it safe? if (in_array($arguments0,array(‘campaign’,‘toolkit’,‘group’,‘organization’))) { while ($removed_args[] = array_pop($arguments) ) { $test = implode(”/”,$arguments); if ($real_path = drupal_get_normal_path($test)) { $real_path .= ‘/’ . implode(’/’,$removed_args); menu_set_active_item($real_path); break; } } }
by Eric on Mon, 07/14/2008 - 09:54

I don't follow

I’m not sure how this relates

by venkat-rk@drupal.org (not verified) on Wed, 07/16/2008 - 09:27
by Eric on Mon, 07/14/2008 - 09:58

extension

I actually started trying to integrate it into pathauto, but time became an issue and got hung up on integrating instead of finding a working solution. I also wasn’t convinced at the time that I would be able to cover all the bases and not break pathauto. But, I am going to take another look at moving it into pathauto since I have some time this week. I also need to make contact with the pathauto authors. ;)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <strong> <code> <p> <img> <ul> <ol> <li> <h2> <h3> <h4> <b> <u> <i>
  • You may insert videos with [video:URL]

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.