Here's my proposal for a “better idea”
It has the pages:
- days:01
- days:02
- days:03
- …
- days:29
- days:30
- days:31
All of these pages are blank, but the titles of the first 9 pages don't have the preceding zero. They must be created in perfect numeric order, so they can be sorted properly by creation date (this wouldn't be necessary if the ListPages could sort by page-name as well as page-title).
It then has the pages:
And custom CSS must be applied:
.month-grid p { margin: auto 0;}
.month-grid a.newpage { color: lightgreen;}
.month-grid a { color: deepskyblue; font-weight: bold;}
So there's a grand total of 33 pages for this “better system”. You can see it in action here.
So there is a different framework for pages of each day in the calendar. Each page is structured year:month-abbreviation:day. So if there was an event on the 10th of August, its page name would be 2009:aug:10.
Using the ListPages module in the inc:month-backend page, you can use the pages from the “days” category to automatically set each page-name for each day of the month.
Combine that with the magic of includes, and you can specify which day the first day of the month is, and how many days in that month.
The inc:month page is where all the real magic happens. I worked out a clever way to hack use the Wikidot engine, where by specifying a variable in an include, you are actually specifying the variable of another variable in the include. Simply said, if you specify that |month=january, the "january" variable will be set to “TRUE”.
Using this technique, I was able to automatically determine the number of days in February depending on whether the |leap-year variable was set to TRUE or not.
The reason that this system is “better” is because you can create a calendar for a month with the use of a single include.
An inconvenience with this system is that you must specify which day of the week is the first day of the month.
How's that Phil?
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript