A page type that lets users create arbitrary lists
PHP
Latest commit a55e16e Feb 20, 2017 @nyeholt committed on GitHub Merge pull request #13 from nglasl/patch-1
FIX, this is required so the listing page doesn't eat AJAX requests a…
Permalink
Failed to load latest commit information.
code
images
CHANGELOG
README.md
VERSION
_config.php
composer.json

README.md

Listing Page Module

Maintainer Contact

Marcus Nyeholt

Requirements

Documentation

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 %>
      <span>
        <% loop $Items.PaginationSummary %>
          <% if CurrentBool %>
            $PageNum
          <% else %>
            <a href="$Link" title="View page number $PageNum">$PageNum</a>
          <% end_if %>
        <% end_loop %>
      </span>

    </div>
 <% end_if %>

API

GitHub Wiki

Troubleshooting

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