10390 Posts in 2202 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 433 Views |
-
Event Calendar - show only first of multi date event

17 January 2011 at 11:52am Last edited: 17 January 2011 11:58am
Hi, i have an image rotator, that shows images from the upcoming events. When i have a multiple date event, an image appears for each date, but i want it only to appear for the next event. What can i do?
<% control UpcomingEvents %>
<% if Event.Image %>
<li><a href="$Link">
<% control Event.Image %>
<img src="$URL" width="602" height="333" />
<% end_control %>
</a></li>
<% end_if %>
<% end_control %>and in my code:
class HomePage_Controller extends Page_Controller {
function UpcomingEvents()
{
return DataObject::get_one("Calendar")->upcomingEvents(50);
}}
also, how can i set the image to a set size, $url.setwidth doesnt work obviously.
thanks!
| 433 Views | ||
|
Page:
1
|
Go to Top |

