Load page by date
I need to display "Page A" on four days of the month (the 14th thru 17th), then display "Page B" on all the other days. Is there a simple way to automate this?
Thank you.
tmayo
I need to display "Page A" on four days of the month (the 14th thru 17th), then display "Page B" on all the other days. Is there a simple way to automate this?
Thank you.
tmayo
Comments
Page by Date
It would depend on what language you where using, but any server side language would allow you to use
DatePart to find the Date of the Month, and use that to load a page, possible use a response.redirect on Page B if the date is between the 14 and 17, if you site is not dynamically driven, or more ideal if these pages are linked from your navigation, use an IF statement to set the link URL
varTodaysDate = DatePart('d',Date()) gives your the current date number.
You could then use an IF statement to say when the varTodaysDate was >= 14 and <= 17 then varURL = Page A, else varURL = Page B
Obviously that is a crude example, but should give you the idea.
You must me logged in to write a comment.