Thanks again UncleCheese, I managed to get it working, and it's sweet as a nut :)
Here's the code for anyone else that might need it:
private static $col1_alpha = array ('a','b','c','d','e','f','g','h','i','j','k','l','m');
private static $col2_alpha = array ('n','o','p','q','r','s','t','u','v','w','x','y','z');
private function getGuideEntries($column)
{
$set = new DataObjectSet();
$letters = $column;
foreach($letters as $letter) {
$filter = "Title > '$letter'";
$filter .= ($next = next($letters)) ? " AND Title < '$next'" : "";
$set->push(new ArrayData(array(
'Letter' => $letter,
'Listings' => $this->ResourceItems($filter, "Title ASC")
))
);
}
return $set;
}
public function getAtoMEntries()
{
return $this->getGuideEntries(self::$col1_alpha);
}
public function getNtoZEntries()
{
return $this->getGuideEntries(self::$col2_alpha);
}
Cheers