Saturday, August 11, 2012

How to create news items and a news list in Drupal

Drupal does not come with an out-of-the-box news content type. You could use a Information or a blog content, but these are not an exact fit for what we want.  Fortunately, it is pretty easy to create your own ‘News’ content type. You probably have your own idea of what a ‘news item’ should be, and how it should display. Techzarinfo professional Drupal Web Development team provides a customer-based web services in Drupal Web Design, Drupal Website Development Chennai etc..
 

Introduction:

Just create a new node type and call it "news". If you do not want users to be able to post news items, configure the permissions accordingly. You will be able to use the views module to configure blocks like you want. You can create a new page with blocks of content even to display your news items however you want, and give the page its own menu item. Here are the features we wanted for news items:

Requirements

•    News items to be their own ‘content type’ so we can create user roles just for posting news items.
•    Latest five news items to show in a block on the first page.
•    Separate ‘news’ page that lists all news items, most recent first, with paging (eg. Show 10 at a time).
•    ‘News’ page should be a Primary menu item
•    List to show date of the item and title of the item, with the title being a link to the full article
•    News items to support ‘teasers’
•    Have an Archive block on the News page to show an archive of news items by month

Summary of Process

Here’s an overview of  how you do it, followed by detailed instructions.
•    Install the Drupal Views contributed module (if you haven’t already done so).
•    Install Drupal Advanced Help module (this provides a great example of using Views to create a block or page that presents lists of information)
•    Create a content type of ‘news’
•    Check the options to add, change or delete own news items for the appropriate users or roles.
•    Create a ‘block’ view to display news items
•    Place the block somewhere on the first page
•    Create a ‘page’ view to display news items.  You choose which Primary menu item you want to use for this page when you create the view.
•    Create an ‘archive’ block view to display archives by cloning the provided Archive view and changing it
•    Place the archive block somewhere on your news page.

8 comments:

  1. Really drupal is one of the best out sourcing content management system.
    durpal developer

    ReplyDelete
  2. Great article! Well-written and nicely presented. Cheers from Montreal!
    dot net developers

    ReplyDelete
  3. Thanks for such innovative and amazing information..Good here is really nice information...by MGT 521 Week 4 provider

    ReplyDelete
  4. This could be one particular of the most useful blogs We have ever arrive across on this subject.
    by Homework Help provider

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. pleasing blog i am see this this blog so distinct and this blog topics is so intriguing i like this blog bust luck and care on........
    by STR 581 Individual Assignment | MGT 350 Individual Assignment Provider

    ReplyDelete
  7. Hi you are doing an excellent job. I was looking for these details. I discovered it on your web page it’s really awesome. I like those details. I am sure that these are your own views. They are really awesome.
    Website Design Companies Bangalore

    ReplyDelete