The [teamnews] shortcode shows the latest team news stories from a news group, or several, on any page. Team news is the intranet’s local news: short stories that a team or a network publishes for its own people, kept apart from the organisation-wide news. Each story belongs to one or more news groups, and the shortcode picks stories by group.
Switch on team news
Team news needs the Teams module and the Team news pages switch, both under Options, Modules. That adds Team news to the admin menu, with News groups beneath it. Create a group for each team or network that will publish, and on each group choose its Owning team, so the group is selected automatically when that team’s members write a story, and a Landing page, the page that carries the group’s news, used for breadcrumbs and menu highlighting. Groups can be nested.
Contributors can draft team news, authors can publish their own, and editors can publish and edit anyone’s. Each story can be given an expiry date and an action for when it passes.
Add the teamnews shortcode
In the editor toolbar select the shortcode button, choose Team news, enter the news group’s slug, pick how many stories and which layout, then select Insert. Or type it:
[teamnews group="finance" num="4"]
Put it on the group’s landing page, so that page shows the latest stories above or beside whatever else it holds.
Attributes of teamnews
group
The slug of a news group, as shown under Team news, News groups. Give several separated by commas to combine groups. Left out, the shortcode shows the latest team news from every group.
num
The most stories to show. The default is 5.
type
Leave it out for the block layout: each story’s featured image, its title, the date and its excerpt. Set type="list" for a compact list of linked titles with dates, which suits a sidebar.
What teamnews shows
The newest published stories in the chosen groups, newest first. Stories that have expired and been unpublished by their expiry action are not shown. After the list, an Archive link goes to the first group’s own archive, which lists every story in that group.
Examples of teamnews
The five latest stories from the finance group, with images and excerpts:
[teamnews group="finance"]
A compact list of the last eight stories from two groups, for a sidebar:
[teamnews group="finance,procurement" num="8" type="list"]
Related
- Teams template: the teams listing and how teams are structured.
- Set up the staff directory: creating teams.
- Display a list of posts: the equivalent list for organisation-wide news.
