Is it possible to invoke an IF argument to stop the display of a graphic in a template after a certain amount of time?
On my local television news site - we put a single graphic up with each story we post. The graphic comes from an Image Gallery as a related entry.
I would like to delete some of my old graphic out of my gallery and off my server to free up some space.
But… if I delete a graphic from 2 years ago - but the article it was attached to from two years ago is viewed - I would get the “missing graphic” problem. The only alternative is to open up each of my hundreds of past articles and “un-relate” each one’s related graphic.
What I want to do is somehow use the IF argument (or some other PHP argument) to not display story graphic in articles that are more than 180 days old.
I’m looking for something like this:
IF the entry_date is over 180 days in the past - don’t display the related graphic… but IF the entry_date is not yet 180 days in the past - then go ahead and show the related graphic.
Any thoughts?
If I can manage this, I can dump countless graphics that are in my gallery at the moment but no longer really needed.
DISREGARD - I figured it out using some php code I had stashed elsewhere on the site - doing another “timer” job.