Community Documentation

How to create an Announcements block

Last updated November 4, 2011. Created by schnelle02 on October 10, 2011.
Log in to edit this page.

This is a tutorial for creating a custom content type and view, which will allow users(or a specific role) to post an announcement. A view will be created to display a list of recent announcement on the homepage. This tutorial was written for Drupal 7.

Things you will need: Drupal installations, Views Module

Step 1

Navigate to Structure-->Content Types and select 'Add content type'.
Name the content type "Announcements" and click 'Save content type'.

(Note: You may also want to add additional fields to the content type such as an image field, but in this tutorial we will be keeping it simple with a title and body.)

Step 2

Navigate to Structure-->Views and select 'Add new view'.
Name the view "Recent Announcements".
Select Show 'Content' of type 'Announcements' sorted by 'Newest first'. (This is directly below the Name)
Un-check the 'Create a page' check box.
Check the 'Create a block' check box.
Title the block "Recent Announcements".
Leave the other options as the default.
Click 'Save and Exit'.

Step 3

Navigate to Structure-->Blocks.
Scroll down to the 'Disabled' blocks.
Drag the block "View: Recent Announcements to the desired section of the page. (likely a sidebar)
Click 'Save Blocks' at the bottom of the page.
Scroll down to the section you place the block on, and click 'Configure' on the block.
At the Bottom of the configuration page, select the 'Only on the listed pages' radio button.
In the text area, add your homepage path or "".
Click 'Save block'.

Step 4

Navigate to People, and select the Permissions tab.
Adjust the permissions for the 'Announcement' content type as desired.

Now you're done, the selected roles can create announcements to be linked to the homepage!

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 7.x
Audience
Site administrators

Tutorials and site recipes

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.