This code snippet is a simple example of how I build the "Blog Archive " Element.
// get list of blog entries
// ------------------------
$archive = $this->Blog->BlogEntry->findAll(
null,
array(
'BlogEntry.id',
'BlogEntry.created'
),
'BlogEntry.created DESC',
null,
null,
-1
);
// loop through and build a relative list
// --------------------------------------
for($i=0;$i<count($archive);$i++) {
$key = date('F Y',strtotime($archive[$i]['BlogEntry']['created']));
$out[$key][] = $archive[$i]['BlogEntry']['id'];
}