I have the hack working that allows me to make some events local to the calendar they are entered in and not display in the Meta Calendar.
I created a new template by making a directory in /templates/calendars directory and copying the files to it from the template I wanted to use for the Meta Calendar. Also, since only the Meta Calendar will use this template I didn't have to test which calendar is being displayed. I figured it would make customizing the Meta Calendar easier if it was the only calendar using a template. I used the dayspan template as a base.
I then set the Meta Calendar to use the new template.
In each calendar I wanted to have local events I added a custom field local with two possible values: yes and no.
I modified the default template (in the new template directory) by adding:
code:
< % if ($EVENT->{'details'}->{'local'} eq "no" | | $EVENT->{'details'}->{'local'} eq "") { % >[/CODE}right after each:
[CODE}< % FOREACH EVENT % >
This checks to see if the event is local OR if there is a null value for local. If the condition is met the normal printing of the event occurs.
I also added:
code:
< % } % >
just before the closing:
code:
< % /FOREACH % >
I had to do this at each:
code:
< % FOREACH EVENT % >
All events that were entered into a calendar show on that calendar and all events where local isn't set to yes show up on the Meta Calendar.
You can download the default.html file at:
http://www.rdtk.net/files/default_html.zip
WARNING: I did not comment this as I worked on it. I know I should have and I'll try to be better next time.
The file has other modifications, they include:
A different month nav bar at the top of the calendar.
The list display has been altered so that dates that had only local events aren't displayed. They were initially showing up as a blank date.
My thanks to everyone who posts here with helpful suggestions. The search feature in the forums is a great way to find answers and examples.
NOTE: There are some extra spaces in the code above so it will display.
------------------
Dale Ray
[This message has been edited by eladyar (edited January 29, 2003).]
[This message has been edited by eladyar (edited January 29, 2003).]
[This message has been edited by eladyar (edited January 29, 2003).]
[This message has been edited by eladyar (edited August 20, 2004).]