Create a block of recent stories

In this example, you will create a list of nodes of the default content type "story". Through this step-by-step process, you will become familiar with some basic steps in creating a view, and familiarize yourself with the Views User Interface.

  1. Go to add new view. Give it the name 'recent_stories', description 'Recent Stories', tag 'story', type 'Node' and click Next.
  2. About the Interface. You have been brought to the Views User Interface. As you start, you are editing the "Default" options for the view. In the 1st column on the left- you can see the drop-down menu offers 'block', for example, to select settings specific only to block views. In the remaining columns, you will be able to add or change options by clicking on links or icons. These options appear below this main area. Most likely, you will need to scroll to see the options appear.
  3. Select fields to display Title and Date; format and re-order.
    1. In 3rd column locate Fields options. Click the + icon to add fields.
    2. Scroll down to "Defaults: Add fields." In the Groups drop-down menu select 'Node', then check the following two fields: Node: Post date, Node: Title. Then click Add.
    3. You will be taken through the fields you added one at a time. Make the changes specified below. (Click Update to go to the next field).
      • For the Post date field: Delete the 'Post date' label. Change the Date format to Custom, and the Custom date format to 'F j, Y, g:i a' (don't type the single quotes). Click Update.
      • For the Title field: Delete the 'Title' label. Select Link this field to its node. Click Update.
    4. Scroll back up to Fields click the up/down icon to rearrange fields.
    5. Drag the four-sided arrow next to Node: Title so that it appears above Node: Post date. Click Update to save the new field order.
  4. Add filters to get nodes of the story type.
    1. Click the + icon next to Filters.
    2. In the Groups drop-down menu select 'Node', then check the Node: Published and Node: Type filters, and click Add.
    3. Select the Published checkbox. Click Update
    4. Select Is one of and check Story in the Node Type field. Click Update.
  5. Sort to show most recent first.
    1. Scroll up to Sort criteria and click the + icon.
    2. In the Groups drop-down menu below, select 'Node', then check Node: Post date, and click Add. Alternatively, you may instead check Node: Last comment time, or Node: Updated/commented date, or Node: Updated date.
    3. Select Descending Sort order. Click Update.
  6. Change the Basic Settings.
    1. In 1st column under "Basic Settings" locate these options:
      • Items to Display setting, click 10. Change the '10' to '4'. Click Update
      • Style setting, click Unformatted. Change to List. Click Update.
  7. Add block display for custom options.
    1. In the dropdown on the left, ensure that Block is selected, and click Add Display.
    2. Under Block setttings, click the None link next to the Admin setting. Change Block: Block admin description to 'Recent Stories'.
  8. Save your view.
Configure your block via admin/build/block. (A quick way to get there is to replace everything in the URL from 'view' on, with 'block'.) Place your block in a region and press Save. You may press Configure to set the title, to determine which roles can view the block, and on which pages it appears. If you want your block on the front page only, enter '<front>'.