/**
  * Obtains root page id for the current request.
  *
  * @return int
  */
 protected function getRootPid()
 {
     if ($this->conf['rootpage_id']) {
         // Take PID from rootpage_id if any:
         $startPid = intval($this->conf['rootpage_id']);
     } else {
         $startPid = $this->pObj->findRootPageId();
     }
     return intval($startPid);
 }
	/**
	 * Search recursively for the URL in the page tree and return the ID of the path ("manual" id resolve)
	 *
	 * @param	array		Path parts, passed by reference.
	 * @return	array		Info array, currently with "id" set to the ID.
	 */
	function findIDByURL(&$urlParts) {

		// Initialize:
		$info = array();
		$info['id'] = 0;
		$GET_VARS = '';

		// Find the PID where to begin the resolve:
		if ($this->conf['rootpage_id']) { // Take PID from rootpage_id if any:
			$pid = intval($this->conf['rootpage_id']);
		}
		else {
			$pid = $this->pObj->findRootPageId();
		}

		// Now, recursively search for the path from this root (if there are any elements in $urlParts)
		if ($pid && count($urlParts)) {
			list($info['id'], $mpvar) = $this->searchTitle($pid, '', $urlParts);
			if ($mpvar) {
				$GET_VARS = array('MP' => $mpvar);
			}
		}

		return array($info, $GET_VARS);
	}