[Zope] Caledar Tag

Jason Spisak webmaster@hiretechs.com
Fri, 10 Sep 1999 08:39:24 -0400


John,

Michel is very estute as always. :^)

I use the Calendar tag to sort through 22,000 possibilities, and it's
sub-second (Michel's Catalog rocks with indexes)

The trick is to create a field_index on the date property, and any other
property that you'll be qualifying the data to be shown, and then narrow
it down by meta_type (ZClasses work well here). If I don't index it's a
dog.  If I dont't narrow it down by "Calendar" relevant meta_types but
still index it, it's less of a dog, but not instant like I'll bet you're
looking for.

The a top snip of the code I ended up with is:

<!--#var standard_html_header-->
<center>
<!--#with
"_(recruiter_stuff=Catalog(recruiter=AUTHENTICATED_USER.getUserName(),
meta_type=['Interview','Deal','Appointment','Call']))"-->
<!--#calendar mode=month-->
       <a href="<!--#var "linkDate(date)"-->">
         <!--#in recruiter_stuff-->
           <!--#if "calendar_date.dayOfYear()==date.dayOfYear()"-->
            <font color="FF0000">
           <!--#/if-->
         <!--#/in-->
       <!--#var date fmt=dd--></a>
       </font>
<!--#/with-->
<!--#var standard_html_footer-->

Good luck!
-- 
Jason Spisak
webmaster@hiretechs.com