|
Date: 1/11/2008 3:25 pm · Subject: Calendar Template Help · Rating: -1
I hope someone out there can help me: I'm trying to create a semantic small month view for the calendar. The problem is that I keep getting an error: Couldn't call method view on asset for url: offices/e/example/staging/calendar Root cause: HTML::Template->output() : fatal error in loop output : HTML::Template->output() : fatal error in loop output : HTML::Template::param() : attempt to set parameter 'events' with an array ref - parameter is not a TMPL_LOOP! at /data/wre/prereqs/perl/lib/site_perl/5.8.8/HTML/Template.pm line 2997 The real problem is I can't stop the problem loop and the loop and variable descriptions don't seem to match the variables and loop names in the templates (i.e. dayOfMonth is listed as the tmpl_var but dayMonth is the actual var etc...) I plan to post a few calendar templates based on this to the Add Ons section so any help will hopefully benefit us all. Here's the template: <tmpl_if admin> <p><tmpl_var adminControls></p> </tmpl_if>
<tmpl_if displayTitle> <h2><tmpl_var title></h2> </tmpl_if>
<tmpl_if description> <tmpl_var description> </tmpl_if> <div class="calendar"> <ul class="calNav"> <li><a href="<tmpl_var urlDay>">Day</a></li> <li><a href="<tmpl_var urlWeek>">Week</a></li> <li><a href="<tmpl_var urlMonth>">Month</a></li> <li><a href="<tmpl_var urlSearch>">Search</a></li> </ul> <ul class="calControls"> <tmpl_if editor><li><a href="<tmpl_var urlAdd>">Add Event</a></li></tmpl_if> <li><a href="<tmpl_var urlPrint>">Print</a></li> <li><a href="<tmpl_var urlIcal>">iCal </a></li> <!--• <a href="#">Subscribe</a>--> </ul>
<ul class="yrMonthNav"> <li><a href="<tmpl_var pagePrevUrl>" class="yearNavLast">« <tmpl_var pagePrevYear></a> •</li> <tmpl_loop months><li class="monthLink<tmpl_if monthCurrent> current</tmpl_if>"><a href="<tmpl_var monthUrl>"><tmpl_var monthAbbr></a></li></tmpl_loop> <li>• <a href="<tmpl_var pageNextUrl>" class="yearNavNext"><tmpl_var pageNextYear> »</a></li> </ul> <div class="calContainer"> <table cellspacing="0" cellpadding="0" class="mCal">
<thead> <!-- day names --> <tr><th class="monthTitle" colspan="7"><tmpl_var monthName> <tmpl_var year></th></tr> <tr> <tmpl_loop dayNames><th><tmpl_var dayAbbr></th></tmpl_loop> </tr> <thead> <tbody> <!-- the grid --> <tmpl_loop weeks><tr> <tmpl_loop days><td class="<tmpl_if dayMonth><tmpl_if events><tmpl_unless dayCurrent>event <tmpl_else>curEvent </tmpl_unless><tmpl_else><tmpl_if dayCurrent>current </tmpl_if></tmpl_if><tmpl_else>nonDay </tmpl_if>"> <tmpl_if dayMonth> <a class="number<tmpl_if events> moreButton</tmpl_if>" <tmpl_if events>id="event_<tmpl_var dayMonth>" onmouseover="return showEvents('overlay<tmpl_var dayMonth>');" </tmpl_if>href="<tmpl_var dayUrl>"><tmpl_var dayMonth></a> <!--/events--> </tmpl_if> <!--/day--> </td></tmpl_loop> <!--/days--> </tr></tmpl_loop> </tbody> </table> </div> <tmpl_loop weeks><tmpl_loop days><tmpl_if events> <div id="overlay<tmpl_var dayMonth>" class="moreDisplay"> <div> <ul> <tmpl_loop events> <li><a href="<tmpl_var eventUrl>"><tmpl_var eventTitle></a><br/></li> </tmpl_loop> </ul> </div> </div> </tmpl_if></tmpl_loop></tmpl_loop> </div>
Thanks - Nate
--- (Edited on 1/11/2008 3:25 pm [GMT-0600] by philadev) ---
|