Build > Script Library > Timely Content Script
Script Library: Timely Content
This script lets you display different content on your page depending on the time of day, date, or day of the week.
Example:
Be as specific as you want - include a time, date, or day of the week. Use text, an image tag, or any valid HTML. The choice is yours!
Follow the editing instructions after the // and after the <!--comment tags--> to customize the script, after you copy and paste it into your HTML editor.
Things to keep in mind:- You should specify a BEGIN and END line for each piece of content you want to display.
- You should specify DEFAULT content to cover any period of time that does not fall in any of the BEGIN and END lines.
- Choose either a beginning and end time, a beginning and end date or a beginning and day for your content.
- If you choose both a date and time, the script will only pay attention to the date.
- Dates should follow the "month/day/year" format; the script will accept 09/09/1999, 9/9/1999, and 9/9/99 equally well.
- Days need to be spelled out (ex. "Wednesday", not "Wed.").
- Times are listed as hours:minutes -- the script will read both 09:34 and 9:34 formats.
- Times can be either 24-hour or 12-hour; if you choose the 12-hour format, the time should be followed by an "AM" or "PM". The "a.m. and "p.m." formats will NOT work.
Save/upload the configuration file.
Save the configuration file you created in Step One as a text file. If you created the file with an offline editor, upload it to your homepage directory using the Web Shell or FTP.
Step Three
Put the HTML in your page
Copy and paste this text into your HTML editor:
