/silverstripe-elemental-countdown

Display time left until a set date and time

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

SilverStripe Elemental Countdown Block

Displays a countdown to a specific date and time.

Build Status Scrutinizer Code Quality Code Coverage Build Status codecov

Latest Stable Version Total Downloads Latest Unstable Version License

Requirements

  • silverstripe/recipe-cms: ^4@dev
  • dnadesign/silverstripe-elemental: ^4@dev

Installation

composer require dynamic/silverstripe-elemental-countdown

Usage

Elemental Countdown Block will add the following Element to your site:

  • Countdown (to a date/time specified in the cms)

Template Notes

When overriding the templates/Dynamic/Elements/CountDown/Elements/ElementCountDown.ss file in your own theme, be sure to include the following in your .countdown element:

  • data-end="$End $Timezone"
  • data-elapse="$Elapse"

example: <div class="countdown" data-end="$End $Timezone" data-elapse="$Elapse" ></div>

The above is used in the initialization of the countdown plugin.

Screen Shots

Front End sample of a Countdown Element

Front End sample of a Countdown Element

CMS - Countdown Element Main Tab

CMS - Countdown Element Main Tab

Getting more elements

See Elemental modules by Dynamic

Configuration

See SilverStripe Elemental Configuration