Calendar Template Script
Posted: Thu Mar 15, 2007 10:00 am
ok so I have been tinkering with the calendar template script here http://www.quin.ie/index.php?page=main-hall, and I have got it in columns now, but what I need to do next is to have the days of the week start with the correct day, and then repeat for each day of the month. below is a part of the template that I have edited so far. I would appreciate any help thanks
{*Table starts here*}
{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{* Generate the Days of the week *}
{$day_short_names[$key]}
{if $weekday == 7}
{assign var=weekday value=1}
{/if}
{*Generate Dates of months*}
{if isset($day.events.0)}{$key}
{*Generate Events for each Day*}
{if $summaries == true}
{foreach from=$day.events item=event}
{$event.event_title}
{/foreach}
{/if}
{else}{$key}{/if}
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}
{*Table starts here*}
{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{* Generate the Days of the week *}
{$day_short_names[$key]}
{if $weekday == 7}
{assign var=weekday value=1}
{/if}
{*Generate Dates of months*}
{if isset($day.events.0)}{$key}
{*Generate Events for each Day*}
{if $summaries == true}
{foreach from=$day.events item=event}
{$event.event_title}
{/foreach}
{/if}
{else}{$key}{/if}
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}