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

Becky Soll

More by Becky Soll

Similar Addons

See All
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.
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.
A modifier that filters a multidimensional array (grid,bard,etc.) by a boolean/toggle field.

If Boolean

by Becky Soll in Modifier
A modifier that filters a multidimensional array (grid,bard,etc.) by a boolean/toggle field.