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 375
Requires Statamic 2

Becky Soll

More by Becky Soll

Similar Addons

See All
Modifier to output a number as a currency

Currency

by Erin Dalzell in Modifier
Modifier to output a number as a currency
Extends the default Bard (MediumEditor) anchor functionality with internal links selection.

Anchor Extension

by Frederik Sauer in Enhancement, Modifier
Extends the default Bard (MediumEditor) anchor functionality with internal links selection.
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.