A page type that allows CMS authors to create templated content listings within the CMS

1.3.1 2017-07-03 03:28 UTC


Maintainer Contact

Marcus Nyeholt <marcus (at) silverstripe (dot) com (dot) au>



GitHub Wiki

Quick Usage Overview

  • Extract to silverstripe/listingpage and run dev/build
  • Navigate to the Listing CMS section and create a listing template
  • Create a new listing page, setting appropriate values
  • Add the $Listing keyword to the page's Content block

Template Options

For pagination, the following might be useful

<% loop $Items %>
	<p>$Title - $Link</p>
<% end_loop %>

<% if Items.MoreThanOnePage %>
    <div id="PageNumbers">
      <% if Items.NotLastPage %>
        <a class="next" href="$Items.NextLink" title="View the next page">Next</a>
      <% end_if %>
      <% if Items.NotFirstPage %>
        <a class="prev" href="$Items.PrevLink" title="View the previous page">Prev</a>
      <% end_if %>
        <% loop $Items.PaginationSummary %>
          <% if CurrentBool %>
          <% else %>
            <a href="$Link" title="View page number $PageNum">$PageNum</a>
          <% end_if %>
        <% end_loop %>
 <% end_if %>


GitHub Wiki


Make sure you have the $Listing variable in your page content for the listing to be inserted correctly.