serializer and weblog
[ start | index | login ]
start > 2009-11-20 > 1

2009-11-20 #1

Created by case. Last edited by case, 2 years and 180 days ago. Viewed 597 times. #1
[edit] [rdf]
labels
attachments

Date dependent content with Server Side Includes

Today I had to update a static website to show some xmas content in December. As I am a lazy guy, I searched for an option to show the content somehow automatically as soon as it is December and to stop displaying it in January.

Because that site is a simple static hosted website with only SSI available, I checked on SSI capabilities and inlcuded the content as follows:

<!--#config timefmt="%b" -->
<!--#set var="month" value="$DATE_LOCAL" -->
<!--#if expr="$month = Dec" -->
<!--#include file ="xmas.html" -->
<!--#endif -->

With some more tweaks you could rotate the look (e.g. with different css files) and content of your static website in regular intervals without too much work involved.

no comments | post comment
Motto
Communication is key

quick Quick Links
WhatIsThis about?
Java mobile Sudoku
Jave mobile Kakuro
more Java mobile apps...
PostTrack (a desktop app)
TimeLine
Impressum
Charley - suzie's dog

Logged in Users: (1)
… and 2 Guests.

Icon-Snip more changes...

Twitter updates

Twitter Updates

    more updates...

    Blogs
    >>Polskie Wyzwania
    >>++ vox.machina ++
    >>Zitate - Sprüche - Aphorismen
    >>Wil Wheaton
    >>Mathematische Kleinigkeiten
    >>William Gibson
    >>instant-thinking
    >>Over heard in NY

    RSS Feed RSS Feed
    post to del.icio.us

    Stats: 1223 snips by 16 users
    take-off 9 years and 125 days ago

    Powered by
    >>SnipSnap 1.0b2-uttoxeter
    with SnipScale 1.1.0



    This work is licensed under a
    >>Creative Commons License.

    SEARCH