/assets_expiry_date

EE2 extension that adds an Expiry Date metadata field to file HUDs

Primary LanguagePHP

Assets Expiry Date

This EE2 extension demonstrates how to use Assets’s new assets_meta_add_row hook. It adds an “Expiry Date” metadata field to file HUDs.

Requirements

Installation

  • Upload the assets_expiry_date folder to system/expressionengine/third_party/
  • Enable Assets Expiry Date in Add-Ons → Extensions

Usage

Upon installation, each of your files’ HUDs will get a new “Expiry Date” field.

You can access a file’s expiry date from Assets’ primary tag pair via the {expiry_date} variable tag, which accepts the same format= parameter as any other date variable tag in EE.

You can also filter your Assets fields to only show files which haven’t expired by adding expiry_date=">{current_time}" to your opening Assets field tag.