10375 Posts in 2190 Topics by 1707 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 734 Views |
-
[Solved] EventCalendar OtherDates totals

19 November 2009 at 1:51am Last edited: 19 November 2009 11:16pm
Hi Uncle Cheese,
maybe you can help me out (please ?).
I'm trying to show the total amount of days for an event in the template using following code:
Workshop.ss
<% if Dates %>
<% control Dates %>
<% if TotalItems == 1 %>
<% if OtherDates %>
<% control OtherDates %>
<% if First %>
<dt>$TotalItems Termine</dt>
<% end_if %>
<% end_control %>
<% else %
<dt>$TotalItems Termin</dt>
<% end_if %>
<% else %>
<% if TotalItems == 1 %>
<dt>$TotalItems Termine</dt>
<% else %>
<% if First %>
<dt>$TotalItems Termine</dt>
<% end_if %>
<% end_if %>
<% end_if %>
<% end_control %>
<% end_if %>When I enter an event from 08/24 up to 10/26, recurring every Monday, the code above results in a total of 8 times, which actually should result in a total of 10. This because I'm in the loop of OtherDates. Any idea on how to get the real amount of times, e.g. 10 ?
Thanks in advance for any suggestion.
mathiasmex
-
Re: [Solved] EventCalendar OtherDates totals

19 November 2009 at 11:20pm
Ok, found the solution:
just included in WorkshopDateTime.php:
public function TotalItemsCounter() {
return ($this->iteratorTotalItems + 2);
}and altered Workshop.ss as follows:
<% if OtherDates %>
<% control OtherDates %>
<% if First %>
<dt>$TotalItemsCounter Termine</dt>
<% end_if %>
<% end_control %>
<% else %>
<dt>$TotalItems Termin</dt>
<% end_if %>Thanks to ssbits.
mathiasmex
| 734 Views | ||
|
Page:
1
|
Go to Top |

