Kirbytext Plugin for Kirby CMS to control visibility of content based on date
cd your-kirby-project/site/plugins && git submodule add [email protected]:lulezi/show-between.git
Alternatively, you can just git clone
or copy the repository manually into site/plugins
.
The configuration is optional but allows you to facilitate usage of the plugin.
c::get('config-key', 'value')
config-key | default |
---|---|
show-between.timezone |
date_default_timezone_get() (see http://php.net/manual/en/timezones.php) |
show-between.from |
'from' |
show-between.until |
'until' |
(from: 2016-07-15 …)
This will only be visible from July 15th, 2016 into the future.
(… from)
(until: 2016-07-15 …)
This will only be visible until July 15th, 2016.
(… from)
(from: 2016-07-14 until: 2016-07-16 …)
This will only be visible from July 14th, 2016 until July 16th, 2016.
(… from)
Visible until specified date, then hidden, then visible again from specified date
(until: 2016-07-14 from: 2016-07-16 …)
This will always be visible except on July 15th, 2016.
(… from)
c::set('show-between.from', 'von');
c::set('show-between.until', 'bis');
(von: 2016-07-14 bis: 2016-07-16 …)
This will only be visible from July 14th, 2016 until July 16th, 2016.
(… von)