Testing whether event metadata Date is less than todays date


#1

Matrix Version:

6.45.0

Hi all,

I’m currently trying to create an Asset Listing targeting Standard Page and Link assets with an attached Date metadata field and want these assets to fall off naturally once the metadata Date field is older than todays date. We have restrictions where we can’t make use of Event assets hence the Standard Page and Link assets.

At present I’m trying to do so with a keyword test in my Asset Listings Default Format:
%begin_asset_metadata_endDate^lt:globals_date%
%else_asset%
(code)
%end_asset%

Where asset_metadata_endDate is the Date metadata field. This doesn’t seem to work though as it hides all assets despite them all having future dates set in the metadata field. Is there a particular combination of conditional keywords I can use to test whether the metadata Date field has passed or not?

Any help you can give would be much appreciated.


(Rhys) #2

I think you just need to wrap the globals_date in braces {}

like this

%begin_asset_metadata_endDate^lt_date:{globals_date}%
%else_asset%
(code)
%end_asset%


#3

Absolute legend, that did the trick. Thank you for the advice!