Which Calendar asset to use to restrict results based on the current date?


(Luke Geoghegan) #1
Hi,
 
I'm trying to set up a jobs page, I thought I could make use of the start and end date fields on a single calendar asset. I was trying to figure out how to display that have a start date in the past and a closing date in the future within a calendar page or a calendar search page but I couldn't work out how, then I came across 'Restricted-Period Calendar Page' however it seems that I can only set an absolute date rather than a relative one, i.e. I need to specify an actual date rather than upcoming ones.
 
Basically I just want to create a page to only display single calendar events based on whether or not they're currently 'open', i.e. if the actual current date falls between the start and end date on the event asset.
 
Hoping that wasn't worded too badly and someone may have the answer..
 
Thanks

(Anthony) #2

You might have more luck with a rolling calendar page where you can specify a number of day in the past / future to include so that is relative to the current date. But also you could consider having a trigger to change the status when the date is past and then use a standard asset listing page to pick up only "live" assets.

 

Really what you plan doesnt sound like an "event" as such... so you might want to consider making your entries standard page assets and set the "future status" option separately when you first create the asset (so that it archives at the intended end date). You can also create metadata to record any additional information about the job that might be useful to you - for example what department / client its for, the contact etc?