textagroup/countdown
最新稳定版本:v1.0.0
Composer 安装命令:
composer require textagroup/countdown
包简介
Add a countdown widget to a page
README 文档
README
Maintainer Contact
- Kirk Mayo (Nickname: textagroup) kirk.mayo@solnet.co.nz
Requirements
- SilverStripe 3.1
Documentation
Adds a countdown widget to a SilverStripe page widget
Installation
composer require "textagroup/countdown"
Setup
To setup a countdown timer the first thing to do is to apply the CoundownWidgetExtension to the page object.
This can be setup in the config yml file as per the example below which will add it to all pages
Page:
extensions:
- CountdownWidgetExtension
or alternatively you can apply the extension through some PHP code
Member::add_extension('MyMemberExtension');
This will add a countdown tab to the page in the CMS where you can set the Countdown date and the format of the countdown.
Then you need to setup where you want the countdown to appear by adding the the variable $Countdown to the relevant SilverStripe template.
<div class="main" role="main">
<div class="inner typography line">
$Countdown
$Layout
</div>
</div>
This will add a div or span to your page with a Countdown timer you can then style the div or span with CSS via the relavant class which defaults to CountdownClock but can be amended via the CMS you can also amend the deafult element ID which defaults to clock
See the following page for examples and information of the jQuery module used
Functionality
This module adds a countdown timer to a SilverStripe page and a date field to the cms section for the page which is used to set the countdown date
##TO DO
- Testing
- Maybe more countdown clock styles
- Internationalisation
统计信息
- 总下载量: 98
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-07-14