protected function compile()
{
$arrItems = array();
$items = \StringUtil::deserialize($this->listitems);
$limit = count($items) - 1;
for ($i = 0, $c = count($items); $i < $c; $i++) {
$arrItems[] = array('class' => $i == 0 ? 'first' : ($i == $limit ? 'last' : ''), 'content' => $items[$i]);
}
$this->Template->items = $arrItems;
$this->Template->tag = $this->listtype == 'ordered' ? 'ol' : 'ul';
}