Alphabetical Sorting of Drupal Nodes Using Views


This tutorial is designed to do two things:

  1. Show you how to sort Drupal nodes alphabetically
  2. Introduce you to the Views module

Views is, without question, the most important Drupal module that is not in the core. It allows you to use a graphical interface to sort and organize all your nodes. It a powerful but also complex module and it can take a lot of time to learn all its features. This tutorial will only help you get your feet wet.

This particular tutorial was inspired by a site member who had the contact details of many employees stored as nodes. They wanted to make an alphabetical directory of all the staff members.

Install Views


Download and install the Views module from the Drupal site:

I’m also going to use the Devel module for this: That has a “Generate Items” option that will allow me to create lots of dummy content to test my alphabetical directory.

Access Views


To access the Views module, go to Administer >> Site building >> Views


On the first Views screen you’ll see a list of sample views waiting to be activated. These include:

  • Archive: “Display a list of months that link to content for that month. “
  • Recent Comments: “Contains a block and a page to list recent comments”
  • Glossary: “A list of all content, by letter. “

Not surprisingly, Glossary is the one we want so click “Enable” next to it.


In order to see what this view will look like, click on the word “glosssary” next to Path:


You’ll see an alphabetical directory of nodes, listed according to their first letter:


Editing the View


In order to adapt this view to our needs, we’ll need to change some aspects of it. To do that, hit the back button in your browser and click on “Edit” next to the glossary entry. You’ll be taken to the main editing page for the Views module. This is where you can make any and all changes to your view:


Modifying the View’s Fields


We’re not going to explain all aspects of the views module in this short tutorial, but we will dive into some aspects of how it works.

For example, you will have noticed the view had three items from each node: the Title, the Author and the date of the Last update. For a directory of staff members, we don’t need those last two items, or as Drupal refers to them “fields”.

Here’s how to remove them:


Click on “User: Name Author”


Scroll all the way to the bottom of the page and click “Remove”.

The repeat the process for “Node: Last Updated” and when you’re done the Fields area should look like the screenshot below:


Filtering Out the Nodes in the View


One other step we’ll need to take is filtering our nodes so that only the Contact nodes are shown in the view. It won’t be a very good directory of staff members if pages, stories and other node types are included. We can do that via the “Filters” area. To get started, click on the plus sign.


You can filter by many different methods, but we’re going to choose the filter by Node type.

Use the dropdown menu to choose “Node” and quickly get to all the node-related filters. Then check “Node: Type” and click “Add”.


On the next screen, choose the nodes you’d like to appear on this view and then click “Update default display”. The final result should look like the screen below.


Now that you’ve made those changes, finish off by clicking “Save” at the bottom of the page.


That should be the final step

The End Result


This will be the end result of your work. All of your Contact nodes will be sorted in an alphabetical directory.

Hopefully it has also been a introduction to the Views module, one you’ll be using much more as you progress with Drupal.

{loadposition drupalnewsletter}


  • Robbie Adair

    Robbie started her career in corporate training until starting her own custom training and media company almost seventeen years ago. In 2010, she began doing classroom training for OSTraining while running Media A-Team. She is often presenting about various tech topics such as Joomla, Fabrik, Web Development, Social Media, and Augmented Reality. She loves seeing that "ah-ha" moment in peoples eyes in her sessions and workshops. She lives in Houston, Texas, but enjoys all the travel for client work and speaking gigs.

0 0 votes
Article Rating
Notify of

Newest Most Voted
Inline Feedbacks
View all comments
13 years ago

Hi Steve, i tried this tutorial and it worked like a charm. i was wondering if i could use this to make the front page(story/anouncments) to look like a recent comments block instead, so i can make more room for other content(photos).

Steve Burge
Steve Burge
13 years ago
Reply to  ricco

Hi Ricco – yes, you can certainly do that with Views. in addition to Glossary, Views actually ships with a recent comments sample views.

12 years ago

Hi, very easy and nice working. However, how can I add a “All” options if I want by default having displayed all content

12 years ago

How display by default all the letters of the alphabet?

11 years ago

This is a great tutorial. I wish I would have located this sooner. One question I do have though; How can I by default display all of the letters A-Z regardless of whether there are no associated documents..for example show A(0)|B(0), etc???.

dc promaster
dc promaster
10 years ago

I want to filter out links to my website content without knowing how? I am using Drupal 7, link following websites [url=]…[/url]

Would love your thoughts, please comment.x