Hello
I'd like to navigate throe events on eventsHolder page by navigations links like that:
<p>
Select period:<br />
<select name="">
<% control eventsNav.months %>
<option <% if $key==$currentMonth %>selected="selected"<% end_if %> value="$key">$value</option>
<% end_control %>
</select>
<!-- same with years -->
</p>
What should look like data structure on EventsPageHolder_Controller class to use similar template. I have two hash arrays that should be
pattern for sapphire data structures:
private $months = array(
0 => "Jan",
1 => "Feb",
2 => "Mar",
);
private $years = array(
2008 => 2008,
2009 => 2009,
2010 => 2010,
);
and controller method
public function eventsNav()
{
$result = new DataObjectSet();
$months = new DataObjectSet();
$years = new DataObjectSet();
$result->push(array("currentMonth" => $this->month));
$result->push(array("currentYear" => $this->year));
return $result;
}