NOTE: there is an excellent 30 minutes screencast introducing Views at http://www.masteringdrupal.com/screencast/new-features-in-views2/play.
A View is a way of presenting information in the database, it is a way
of providing listings according to certain criteria and orders. It is a
user interface which enables non-programmers to present complicated
data. A view is a dynamic listing of contents, very similar to dynamic blocks in old system.
Go to Site Building, Views and click on Add. You will see a list of all the views that
have been configured. Most of these have been created by Drupal. Click
on "Add" in the box near the top.
The View Name is for admin purposes. We are going to use the example add latest_3_news_title.
The View Description used here
is latest news from homepage.
The Tag is an optional way of sorting,
making it easier to find - you could add news for this example.
The View
Type is a Node, click on this and then click on Next.
Near the top of the page you now see, on the left, is the heading Defaults. We want
to display it as a block so select block and click on "Add
display". (If you were wanting to create a page for articles to appear on, then select page instead of block, e.g. a list of editorials).
You will notice that a red block appears under the Live Preview, which is telling you that you haven't finished!
Block settings appeared when you clicked on Add. You need to add a
description for Block Admin description of latest 3 news items and update it. Now you will see
at the top the name of the block.
Ignore cache
The Filters determine what data is shown. So click on the plus sign by
Filters and you will see a large box below, called Blocks: Add
filters. In the Groups drop down select Node - the display will
automatically change. Then click on Node Type and click on Add.
Operator is one of or is not one of - you have the choice of the node
being one of or not one - in this example we want to select is one of Article so tick on that. You also need to select Article from the Node type and then click on Update.
Add another filter and go to Taxonomy in the drop-down list of Groups and then select Taxonomy term ID, click on and then select News - udate this and it will appear in
filter at top.
Sort criteria select Content, content date:article date and click on add, then click on descending.
Fields are where we specify which bit of items in the list we want to
display. e.g. Author, country, photo, teaser. Fields could have several
rows. Click on the plus sign and then go to the box below which says
Defaults: Add Fields. Click on Node, then Node Title and click on Add.
You will see a box that says Label: Title - if you left this the word
Title would appear in front, so clear this. In the second box it says Display field as a link to the full node - tick this as we want it to be a link to be seen. Update.
Items to display box – the requirement is to have the latest 3 news headings, so we need to alter the amount of 10 to 3 . Click on the number shown and go to the box that allows you to change the number to 3. Save.
We want to edit the title of the view to be latest news. Click on
Fields, then click on Node:Title and the box entitled Label opens. Delete the word title from this as you don't want the word Title to appear and then update and click
on save.
View settings – how the view is listed in the admin list. (don't worry with this)
Under Basic settings, Number of items to display- if this was set to 0 it would
show all of the editions. You could click on use pager if you wanted to
number pages.
Relationships and arguments – leave this as it is advanced!!.