Joomla VS Wordpress – Round 1
Posted by designzillas on 5/14/10
In this tutorial, we will show you how to build a blog and an RSS feed of that blog in Drupal using Views. Views is a query builder which allows you to display content based on multiple criteria.
Before we start, we need to install Views which can be found at http://drupal.org/project/views.
First off, we need to create the content type, which will store the blog title and body. You can create a new content type by going to the administrator page, under Content Management, Content Types. Here are a few steps on how to do so:

Because Views shows a live preview of the result, we want to add a couple of sample blog articles. You can do so by going to node/add and selecting “Blog Entry”. Add three or four dummy blog entries.
You can access Views by going logging in as an administrator and going to: admin/build/views/
Add a new view by clicking on the “Add” Tab. The View Name needs to be a machine readable name (no spaces and no special characters); call it “blog”. Write a simple description of the view and click Next.

Next, you will be presented with the default blank view. Views can have different Displays and all the displays inherit from the Default Display. A Display can be of type Block, Page or Feed. We will start from Fields.


Fields are what is going to be displayed. In our case we want to display our Title, Teaser body and a link to read more.

By now, you can see in the Live Preview, that all of your content is showing up, not only blog articles. This is where Filters come in handy. Filters are if statements, which filter the result of the view. In SQL terms, they are WHERE clauses. Because you can have multiple content types, we will use a filter to display only blog articles.
Good practice is also to filter content that is published. You can do so by adding a new filter (Node: Published) and set it to “Yes”.

Now we have a list of articles but they are sorted incorrectly because we want to show the latest article at the top, not the bottom. We will add a new field to do so.

By now, you should be more familiar with the interface so we will skip some of the steps. From the Basic Settings pane, we can adjust a lot of the settings. First of all, let’s add a pager to this view. Click on Use Pager: No, and change it to Full Pager.
The view is now completed so let’s save it by clicking on the Save button on the bottom.
Creating the two displays (latest articles and RSS feed)
We now have our view created so how do we create the actual page? We can do so by creating a new Page Display and assigning it to a path. On the right sidebar, select Page, and Add Display. You will notice that all fields are in italics. That means that they are inheriting from the Default Display. Under the Path Settings pane, click on Path: None and write the URL where this blog will be displayed. In our case we will write “blog”. Save the View.

You can now access you blog at http://www.yoursite.com/blog
Creating an RSS feed is very simple. Follow the same steps but instead of selecting Page as you display type, you would select Feed and in the path settings you would write “blog/rss”.
Save the View and you can now access your RSS feed at http://www.yoursite.com/blog/rss