Tutorial: Simple News View With Drupal

DrupalPersonally, one of the most common things that clients have asked me to do for their website is to make a simple news page.  Here’s a simple tutorial how to make that in Drupal.

Before we begin, you will need to have Drupal 6.x installed and configured. Also, you will need the following modules: CCK, Views.

1. Login as administrator.

2. Go to admin/content/types and click on “Add content type“.

3. Type this in the fields:

Name: "News"
Type: "news"
Description: "News items"

4. Click “Save content type”

5. Go to admin/build/views and click “Add”.

6.  Type this in the fields:

View name: "news"
View Description: "News View"
View type: Node

7. Click “Next”

8. In the Filters-section, click on the plus-sign

9. Check “Node: Type” and click “Add”

10. Choose “Is one of” and “News”. Click “Update”

11. In the Sort Criteria-section, click on the plus-sign

12. Check “Node: Post Date” and “Descending” and click “Add”

13.  Check that Sort order is on “Ascending” and Granularity “Second”, then click “Update”

14. In the Fields-section, click on the plus-sign

15. Check “Node: Title” and “Node: Post Date” and click “Add”

16. Leave “Node: Post Date” as it is and click “Update”

17. For “Node: Title”, clear the Label-field and check “Link this field to its node”, then click “Update”

18. In “Basic Settings”-section, click on “None” after “Title:”

19. Type in “Latest news” and press “Update”

20. Next, we are going to make a page for the news. Above “Add Display“, choose “Page” and click “Add Display”

Newspaper

21. In “Basic Settings”-section, click on “No” after “Display pager:”

22. Choose “Mini pager”, click “Override” and then “Update”

23. In “Page Settings“-section, click on “None” after “Path”

24. Type in “news” and click “Update”

25. In “Page Settings“-section, click on “No menu” after “Menu:”

26. Choose “Normal menu entry” and type in this:

Title: "News"
Menu: "Primary Links"

27. Click “Update”

28. Click “Save”

29. The system is ready. Now we just need to make a test news item. Go to node/add and click “News”

30. Type in the Title and Body for your news item

And you are done! The News-page should be in your main menu and also can be found at www.yoursite.com/news.

Posted in Web Development

Written by Kristian

Enjoy this Post?

Remember to subscribe to our RSS Feed and if you would like, please share this post.

One Comment

  1. John says:

    Thanks for this guide.

    It works OK except for also stripping all non text out of the body such as images etc. We need all body content to appear but I can’t see where to change this. Any ideas?

    John

Leave a Reply