public function render()
	{
		// make sure we have a correct url
		$this->paginationUrl();

		// and a current page number
		$this->calculateNumbers();

		$urls = array();

		// generate the URL's for the pagination block
		if ($this->config['totalPages'] > 1)
		{
			// calculate start- and end page numbers
			$start = $this->config['current'] - floor($this->config['numberOfLinks'] * $this->config['linkOffset']);
			$end = $this->config['current'] + floor($this->config['numberOfLinks'] * ( 1 - $this->config['linkOffset']));

			// adjust for the first few pages
			if ($start < 1)
			{
				$end -= $start - 1;
				$start = 1;
			}

			// make sure we don't overshoot the current page due to rounding issues
			if ($end < $this->config['current'])
			{
				$start++;
				$end++;
			}

			// make sure we don't overshoot the total
			if ($end > $this->config['totalPages'])
			{
				$start = max(1, $start - $end + $this->config['totalPages']);
				$end = $this->config['totalPages'];
			}

			// now generate the URL's for the pagination block
			for($i = $start; $i <= $end; $i++)
			{
				$urls[$i] = $this->generateUrl($i);
			}
		}

		// send the generated url's to the view
		$this->view->set('urls', $urls);

		// store the current and total pages
		$this->view->set('active', $this->config['current']);
		$this->view->set('total', $this->config['totalPages']);

		// do we need to add a first link?
		if ($this->config['showFirst'])
		{
			$this->view->set('first', $this->generateUrl(1));
		}

		if (isset($start) and $start > 1)
		{
			$this->view->set('previous', $this->generateUrl($start-1));
		}

		if (isset($end) and $end !== $this->config['totalPages'])
		{
			$this->view->set('next', $this->generateUrl($end+1));
		}

		// do we need to add a last link?
		if ($this->config['showLast'])
		{
			$this->view->set('last', $this->generateUrl($this->config['totalPages']));
		}

		$this->view->set('align', $this->config['align']);

		// return the view
		return $this->view;
	}