Announcements: Special Notices for Your Site
Last updated on
30 April 2025
This module creates an "announcement" content type and provides both node views and block lists.
This is an adaptation of the sample module writing article from IBM.
An announcement has the following fields:
- Title
- Self-explanatory.
- Publication date
- The first date the announcement will be displayed.
- Expiration date
- The last date the announcement will be displayed.
- Abstract
- An abbreviated description of the announcement. This will be shown in the block. Note: Only the abstract will be indexed for search if you use the Search module.
- Body
- The full text of the announcement.
Installation
Standard module installation applies. The module does have an uninstall function.
Settings
- Maximum number of block announcements
- The maximum number of announcements that will show in a block.
- Default duration of announcement
- When creating a new announcement, the start date will default to today and the ending date will default to today plus this setting's value.
Permissions
- create announcement
- Allows a user to create a new announcement
- edit announcement
- Allows a user to edit any announcement. Note: "edit own" is by default.
Menu Entries / URIs
There is one menu entry for "Announcements." This view of the announcements shows only the abstract and dates for the announcements.
If one appends 'view' to the URI (i.e. http://www.example.com/announcements/view), you will get a full node view.
Blocks
- Announcements: Recent
- Shows recent, active announcements.
- Announcements: In xxx vocabulary
- Shows the terms for the xxx vocabulary, which has been assigned to the 'announcements' content type. There may be more than one vocabulary show, depending on your configuration. Note: if there are no vocabularies assigned, then this block will not be shown.
Styling and Themes
The module comes with a starter set of CSS entries. View the code or use Firebug to discover more styling options.
- theme_announcements_compact
- Formats the main, compact view.
- theme_announcements
- Formats the full node view.
- theme_announcements_block_list
- Formats an entry for the "Recent" block.
- theme_announcements_dates
- Formats the dates for the announcement.
- theme_announcements_abstract
- Formats the abstract.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion