Creating Views
Admin> Help > Views or
./admin/advanced_help/views
Add the advanced help module to get more help within the site on certain modules, including views. Once that module is installed, you get this excellent notated image of the views page as well as other help. (If not installed on the site yet, here's a copy of that one image: Views 2 User Interface.
Admin> Site Bldg>
Views>Add
Add View
- View name is the name in the database - no spaces (Classes)
- View type: node

Edit View: Default
This brings up the Edit View. A default view is created for a generic listing of classes. Then specific pages are created for each variation on that view such as Upcoming classes, or Classes in Photography, or All Classes.
Fields
Fields are the columns of your table, in our case we want Date/Time, Class, Location, and Instructor to be our four columns.
- To add a field, select the little plus sign next to Fields and go below to select your choices. You can narrow the list by selecting Content from the Groups: drop down.
- Select Content: class_location , Content: class_teacher (field_classteacher), and Content: class_time (field_classtime)
- The most basic field that we want is the name of the course being taught. This is actually the Node: Title which is in the Node drop-down area.
- When all the four fields have a checkmark next to them (select <All> from the dropdown if you want to check) select the Add button
- Then you will be taken through the fields you added one at a time. Lookt at the top for the name of each field, select the appropriate paramenters, then click Update default display to go to each next field.
- Optional - in Empty Text put TBD to allow for the cases when some data is missing.
- For each add a Custom Label for the column such as Date/Time, Location, Class, and Instructor for the approrpriate fields.
- For the Instructor field:

- Select Output this field as a link
- In Link Path: enter [field-classteacher_nid] or copy/paste from Replacement patterns section further down the page.
- For the Node title field,
- select Hide if Empty - we don't want to list a course we haven't named yet.
- select Link this field to its node so that when you click on it you get the course description
- Select Save button to save the default view.

So now we've created the default view - the fields that all views will draw from. Now let's create a specific page for Upcoming Classes.
Go to Views, List and look for our Normal Node view:classes. Select Edit
Page Settings
To create a unique page to list Upcoming Classes, select Page from the drop-down under Defaults, then Add display. (If you want a block, select Block from the drop-down and Add display).
These determine how the page that you create will be found; so the url (path) and whether or not it's on the menu and if so which menu
- Set path to the easy url (upcoming_classes)
- Click no menu next to Menu: and enter the parameters as you see them at right. (Normal menu entry and Primary Links with a Title of Upcoming Classes - this is what will show on the menu)
- Select Update button
- Select Save
Basic Settings
- Title: This should probably match the menu item - so let's call it Upcoming Classes
- Style: Click Unformatted next to Style then go to the bottom of the page and select Table, then Update default display button
- Use Pager: click the No, then below choose Full Pager and Update default display
- More link: check Create More Link
- Update
- Save
Preview
Under Live preview select the Preview button and look at the table it creates. It looks pretty good, but there's a lot of nodes in there that don't belong. Filters will help us with that. We'll filter out the nodes that don't belong.

Filters
Select the + sign next to Filters and go below to add filters.
- Check Node: Type to get rid of things that aren't the right type.
- Select the Add button
- Select Is one of and then Course
- Then press update
- Look at the preview - the extraneous non-course entries have been removed!
- Select Save
- Since this is Upcoming Classes, not all classes, we have one more filter to create. We need to limit the list to those that have not occurred yet. Select the plus sign next to Filters.
- Select Date: Date (node)
- Check the Content: class_time (field_classtime) field
- Select Update
- Set Operator: to Is Greater than
- Set Date Default: to now
- Select Update
- Check the preview - any classes held before today will dissapear. New classes occurring after the now point will automatically appear.
- Select Save
- Navitate to http://webclass.wwu.openaccess.org/drupal/upcoming_classes or click the newly created menu link to see your new view!
