core-bundle/src/Resources/contao/elements/ContentList.php
protected function compile()
	{
		$arrItems = array();
		$items = StringUtil::deserialize($this->listitems, true);
		$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';
	}
protected function compile()
	{
		$arrItems = array();
		$items = StringUtil::deserialize($this->listitems, true);
		$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';
	}
Generate the content element