I'd like to do a more complex sorting on my Drupal 7 View. Specifically, I'd like to sort by a particular field alphabetically (easy - that's the default). However, before the View sorts the field I want it to strip out (a predefined) set of words at the beginning of the field (if they exist) such as the word 'the' or 'a' and sort based on the words that follow.

Does anyone know if this is possible?

My workaround will be to just create a 'sort by' field in the content type.

  • +1 Good question. It can be done in MySQL using temporary column at query time: MySQL Sort Alphabetically but Ignore “The”. Interesting to see if there will be a good answer to this. Mar 4, 2016 at 6:17
  • Thanks for the suggestion - it's a good idea. I'll try the given answer first and if that doesn't meet our needs this is a good workaround.
    – Sage
    Mar 9, 2016 at 0:50

1 Answer 1


Have you tried Views Natural Sort -module?

Provides a views filter that sorts node titles by a more natural manner by ignoring articles like "The" and "A."

Not sure if it matches your needs because of "sorts node titles" and in your question you talk about particular field. But maybe you should try it?

At least you can get base for custom module if you need to build one.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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