Expires On

Free!
Download
Expires On
Description

A Statamic 2.0 modifier for tag pairs that cannot be filtered with conditions (aka not a collection or taxonomy). The expiration date field is specified as a parameter (expiration_date in the example below), and it returns items that either don't have one, or have one which is in the future.

Copy ExpiresOn folder into /site/addons/.

Usage

Assuming Today is 2018-1-26

YAML

blocks:
  - 
    block_title: Block A
    expiration_date: 2018-02-28
  - 
    block_title: Block B
    expiration_date: 2017-04-13
  - 
    block_title: Block C
  - 
    block_title: Block D

Antlers

{{ blocks expires_on="expiration_date" }}
  {{ block_title }}<br>
{{ /blocks }}

Outputs

Block A
Block C
Block D

Important Links
Details
Released March 19, 2018
Downloads 256
Requires Statamic 2

Becky Soll

More by Becky Soll

Similar Addons

See All
Modifier that converts formatted phone numbers into valid href "tel" strings.

Tel

by Aryeh Raber in Modifier
Modifier that converts formatted phone numbers into valid href "tel" strings.
Autolinks content wrapped in [braces], just like a wiki.

Wikilinks

by Statamic in Modifier
Autolinks content wrapped in [braces], just like a wiki.
A modifier to count the number of sets (by type) within a bard field.

Set Count

by Becky Soll in Modifier
A modifier to count the number of sets (by type) within a bard field.