How to Sort Drupal Views Alphabetically
Alphabetical sorting is one of the most common ways people want to sort content in Views.
You may want to sort many types of content from A to Z, from staff members to business listings.
Here’s how to add alphabetical sorting to your Drupal views.
Option #1. Create a new view
- Go to Structure > Views > Add new view.
- Enter any views settings you want, except for “sorted by”. You should choose “Title” for this setting.
- Click “Continue and Edit”.
- Scroll down to your preview at the bottom of the view. You’ll see that your view is sorted alphabetically, but from Z to A.
Now we’ll fix the Z to A sorting.
- Look under “Sort Criteria” and click on “Content: Title (desc).
- Change “Sort descending” to “Sort ascending”:
- Check the Preview and you’ll see that your view is now sorted alphabetically:
Option #2: Changing an existing view
If you want to add alphabetically sorting to an existing view, the process is very similar:
- Click “Add” next to “Sort Criteria”.
- Search for “Content: Title” or another field that you want use for alphabetical sorting.
- Choose “Sort ascending” to sort your view from A to Z.
Any idea how to “page” alphabetically?
Hi Anthony
Could you explain that question a bit more?
Views Paging. Sometimes I’d like the pager to page alphabetically, so the pager is A – B – C – D – E, etc, instead of 10 nodes on a page and 1 – 2 – 3 – 4 – 5, etc… This would be especially useful in a list of proper names, such as employees, schools, Sports Teams…
Got it, thanks. Have you see the default “Glossary” view? That seems to do exactly what you describe.
I’ll check it out, thanks. Is that a pager setting, or a default view that needs to be enabled? Or something else?
Yes, a default view to enable.
Thank you!
Any idea how to make search index(apache solr) view sortable by date field? There isn’t any default date sort criteria to use. So I must create one, but I can’t figure out how to make it work.
You could add a date field to the content type and then pull that into the view. Or use the date created date.
No. Unfortunately, It won’t help.
But I found the solution. To make search view sortable by date you have to add date field to search index.
The title sorting works great. However, we have a view that lists libraries and members (title was used for their names). The libraries are in order by when they were added to the site. This means any new member library we have ends up at the bottom of the list. Do you know of a way to get two different items in a view to sorted alphabetically?