public function init($options) {
		
		$this->template = '';
		$this->template_data = '';
		
		$this->template_dir_orig = '';
		
		if ($options['templatepath'] != '') {
			$this->template_dir_orig = $options['templatepath'];
		}
		
		// compile dir is required and must be writable
		$this->compile_dir_orig  = $options['compiledir'];
		
		$this->caching = $options['usecache'];
		
		if ($this->caching) {
			$this->cache_dir    = $options['cachedir'];
		}
		
		$this->templates_extension = 'tpl';
		
		if ($options['extension'] != '') {
			$this->templates_extension = $options['extension'];
		}
		
		$this->initPlugins($options['templatingpluginsdir']);
		
		$this->template_vars = array();
	}