Is it possible to sort by a link field in a view? I don't see the link field in the Add Sort Criteria dropdown list. I'm using Drupal 5.2.

Thanks

Comments

quicksketch’s picture

Not currently. This is mostly because link module allows for a variety of inputs such as http://google.com, google.com, or node/1. Sorting wouldn't make sense in a lot of cases. Other than that, I simply haven't implemented the feature.

asugene’s picture

Having this feature would also help me. I would like to create a view Augment based on this link field. If the views sort and augment was based on the link "title" and not the "target" I believe the views integration can work.

asugene’s picture

Version: 5.x-1.x-dev » 5.x-2.1
Category: support » feature

I would like to sort and use a view augment based on the link field. If they were focused on the "title" and not the "target" would be a good solution.

quicksketch’s picture

Status: Active » Fixed

I added the sort functionality to link URLs, but you'll find it's only useful so long as you're consistent with using "http://" in front of your entered URLs. But since it was practically a one-line change, I figured it's not going to hurt putting it in there.

Here's the commit. It'll be included in 2.2.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/link/link.m...

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.