10380 Posts in 2195 Topics by 1711 members
| Go to End | Next > | |
| Author | Topic: | 1385 Views |
-
[Solved] Event Calendar - show past events

20 February 2011 at 7:56am
Hello (UncleCheese ;)),
I stripped down the calendar template:
<div class="calendar typography">
<h2>$Title</h2>
$Content<div class="ptop20">
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width=""><p><strong>Datum</strong></p></td>
<td valign="top"><p><strong>Wedstrijd</strong></p></td>
<td valign="top"><p><strong>Soort wedstrijd</strong></p></td>
<td valign="top"><p><strong>Plaats/Land</strong></p></td>
<td valign="top"><p><strong>Uitslag</strong></p></td>
</tr><% if Events %>
<% control Events %>
<tr>
<td valign="top">
<p>
$_Dates
<% if AllDay %>
<dt><% _t('ALLDAY','All Day') %></dt>
<% else %>
<% if StartTime %>
<dt><% _t('TIME','Time') %>: </dt>
<dd>$_Times</dd>
<% end_if %>
<% end_if %>
<% if OtherDates %>
<h4><% _t('SEEALSO','See also') %>:</h4>
<% control OtherDates %>
<li><a href="$Link" title="$Event.Title">$_Dates</a>
<% if StartTime %>
<ul>
<li>$_Times</li>
</ul>
<% end_if %>
</li>
<% end_control %>
<% end_if %>
</p>
</td>
<% control Event %>
<td valign="top"><p>$Title </p></td>
<td valign="top"><p><% if SoortWedstrijd %>$SoortWedstrijd<% else %>-<% end_if %></p></td>
<td valign="top"><p><% if Content %>$Content<% else %>-<% end_if %></p></td>
<td valign="top"><p><% if Uitslag %>$Uitslag<% else %>-<% end_if %></p></td>
<% end_control %>
</tr>
<% end_control %>
<% else %>
<% _t('NOEVENTS','There are no events') %>.
<% end_if %>
</table>
<span class="feed"><a href="$RSSLink"><% _t('SUBSCRIBE','Subscribe to the Calendar') %></a></span>
</div>
</div>Now I only see the upcomming events ofcourse.
How do i show the past events as well?I want to have a simple table (year overview)
the past events must be visible but grey, so an extra class to the past events would be nice.How do i do this?
thx!
-
Re: [Solved] Event Calendar - show past events

26 February 2011 at 3:49am Last edited: 26 February 2011 3:49am
Did you try <% control RecentEvents %>??
-
Re: [Solved] Event Calendar - show past events

26 February 2011 at 4:10am
I need something like control children, but this doesn't work.
I want all events to be shown (past and future) oldest event on top, future events at the bottom. Would like to grey-out the events that have been executed.
So in short: in need to display the entire list of events on a single page and add a class to past events.
-
Re: [Solved] Event Calendar - show past events

1 March 2011 at 3:47am
Well, provided you're not using announcements or recurring events, you could use
<% control Children %>
<% control DateTimes %>
<% if StartDate.InPast %> -
Re: [Solved] Event Calendar - show past events

1 March 2011 at 10:32am
this works pretty nice
How do i highlight the current event?need something like: <% if CurrentEvent %>class="highlight"<% end_if %>
Is there a nice doc where i can find template control on event calendar?
-
Re: [Solved] Event Calendar - show past events

1 March 2011 at 11:03am
What do you mean the "current event?"
-
Re: [Solved] Event Calendar - show past events

1 March 2011 at 11:13am Last edited: 1 March 2011 11:14am
well, i have an event that is happening today for instance.
I would like to highlight this item in my table.
and it would be nice to grey-out the events that have already happened. How do i do this in the template?
btw:
<% control Children %>
<% control DateTimes %>
<% if StartDate.InPast %>is giving the same result as:
<% control Children %>
<% control DateTimes %>-> this works nice
thx for that, i got a nice table with all the events planned.
Im working on a racing agenda and extended it with a 'result' box, thats why the past events must be shown
-
Re: [Solved] Event Calendar - show past events

1 March 2011 at 11:16am Last edited: 1 March 2011 11:16am
If there isn't an event on today (the current date), highlight the first upcomming event.
| 1385 Views | ||
| Go to Top | Next > |
