<?php

class static_page extends module {
	
	var $_loc_vars = array( 'templ', 'obj_name', 'id' );
	var $_get_vars = array( 'id' );
	var $obj;
	var $obj_name = '_sys_static';
	var $templ = 'static_page.htm';

	function _init() {
		$this->obj = new cobject( $this->obj_name );	
		return parent::_init();
	}

	function _on_() {
		global $R, $cat;
		
		$tpl = $R->getTpl( $this->templ );
		$this->obj->byId( $this->id );
		$tpl = $R->set('title_or_h1', getFirst($this->obj->get('page_h1'), $this->obj->get('title')), $tpl );
		$tpl = $this->obj->assign( $tpl );
        $cat->setKeywords( $this->obj->get('page_keywords') ) or $cat->setKeywords( $this->obj->get('title') );      
        $cat->setDescription( $this->obj->get('page_description') );      
        $cat->addTitle($this->obj->get('page_title')) or $cat->addTitle($this->obj->get('page_h1')) or $cat->addTitle($this->obj->get('title'));
        
		return $R->clear( $tpl );
	}
	

}	



?>