As the title says: what say we add Views support for URL aliases? Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TravisCarden’s picture

Assigned: TravisCarden » Unassigned
Status: Active » Needs review
FileSize
12.63 KB

Here's a patch adding Views integration. It adds fields for each of the module's table columns as well as one for each of the full redirect destination URL and visit, edit, and delete links. The Type field includes an option to display the status code only or the code with its description. A few things to note:

  • The patch assumes that the patch at #1853140-1: Store created date/time has been committed.
  • I added no automated tests for the new functionality.
  • I didn't do anything special with the Language field. Since my customers don't use it, I just spit it out as it is in the database and didn't test it.
  • I didn't implement arguments functionality at all, because we don't need it. It would be easy to add; I just don't have the time.
  • The "Link to redirect" option links any field to the redirect source. An option could be added to link to the redirect destination URL, too, but that's not in this patch.
  • The status code filter could offer a SELECT box or radio buttons, since it's a small, finite list of options, but that's not in this patch either.
  • The Redirect URL field isn't sortable because it's not based on an actual database column. (I don't know if it's even possible to make such a "virtual" field sortable.)

Here's the patch:

TravisCarden’s picture

Here's another patch that also assumes #265299-14: Add a hit counter.