A simple news module for SilverStripe

Installs: 687

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 11

Forks: 2

Open Issues: 0


dev-master 2019-01-29 12:36 UTC

This package is not auto-updated.

Last update: 2022-01-22 03:13:18 UTC


SilverStripe news is a standalone module which provides content editor features to have news and blog posts in a SilverStripe website.

Read more at blog


User composer to install

composer require silverstripers/silverstripe-news dev-master


  1. Tags
  2. Categories
  3. Archives
  4. Different Types of news posts for different purposes
  5. Use the powerful model admin to manage news
  6. robust search form
  7. friendly urls for tags and categories
  8. Force editing news from the model admin, and doesnt load news pages on to the site tree.


All the configuration options are added on to Site Config

go to SiteConfig from the laft navigation panel and to

Settings -> News tab


Add tags to a page

add the following code to your file or any other template file which renders contents of a Page.

<% if $BlogTags %>
  <% loop $BlogTags %>
    <li><a href='{$Link}'>{$Tag} ({$Count})</a></li>
  <% end_loop %>
<% end_if %>

Add blog archive to a page

the module allows you to chose that format of archive you want to use, this can be configured in the Site Config. the options are

  1. Year
  2. Year, Full Month (2015, April)
  3. Year, Month Number (2015, 04)
  4. Abbreviated Month Name (Jan, Feb, Mar, etc..)

welcome to add more options for these and submit pull requests

<% if $BlogArchives %>
  <% loop $BlogArchives %>
    <li><a href='{$Link}'>{$Archive}</a></li>
  <% end_loop %>
<% end_if %>


to show the news categories made in the CMS use

<% if $NewsCategories %>
  <% loop $NewsCategories %>
    <li><a href='{$Link}'>{$Title}</a></li>
  <% end_loop %>
<% end_if %>

Show news on news index

to show news items on your news index use the following code or similar.

<% if $Items %>
    <ul class="news-list">
        <% loop $Items %>
        <li class="news-item">
            <time datetime="{$DateTime.Format('Y-m-d')}">{$DateTime.Format('F d, Y')}</time>
            <% if $Summary %>
            <% else %>
            <% end_if %>
            <a class="readMore" href="{$Link}">read more&hellip;</a>
        <% end_loop %>

    <% if $Items.MoreThanOnePage %>
        <div class="pagination">
                <% if $Items.NotFirstPage %>
                        <a class="prev" href="{$Items.PrevLink}"><span class="arrow-left"></span></a>
                <% end_if %>
                <% loop $Items.Pages %>
                    <li <% if $CurrentBool %>class="active"<% end_if %>>
                        <% if $Link %>
                            <a href="{$Link}">{$PageNum}</a>
                        <% else %>
                        <% end_if %>
                <% end_loop %>
                <% if $Items.NotLastPage %>
                        <a class="next" href="{$Items.NextLink}"><span class="arrow-right"></span></a>
                <% end_if %>
    <% end_if %>
<% end_if %>

if you want to take the first news articles out of this list, may be on to a hero panel you can do that by passing an offset to the Items functions

the function call would be $Items(1) if you dont want the first item to be returned on to the list.