[]
<?php
class ComposePage extends Page {
public function getLetters() {
$sqlQuery = new SQLQuery();
$sqlQuery->from = array(
"a_letter_template"
);
/*
$result = $sqlQuery->execute();
var_dump($result->first());
*/
$result = $sqlQuery->execute();
$Letters = new ArrayList();
foreach ($result as $record){
$Letters->push(new ArrayData($record));
}
return $Letters;
}
}
class ComposePage_Controller extends Page_Controller {
}
?>
<% loop $Letters %>
<li>$name</li>
<% end_loop %>
Having a naming convention of getFunction that's referenced by $Function is rather obscure. Especially since I could find no trace of it in the Documentation.
Anyway, problem solved.