<?PHP
class content_Model {

	var $call_controller = array('content');
	var $call_helper = array('position', 'title');

	function init(){

		$this->content->POST('insert')->checkMethod('set_defaults')->method();
		$this->content->POST('update')->checkMethod('set_defaults')->method();
		$this->content->POST('update_and_out')->checkMethod('set_defaults')->method('update');
		$this->content->POST('update_details')->checkMethod('set_defaults')->method('update');

		$this->content->POST('insert_image')->checkMethod('set_defaults')->method('insert_file');
		$this->content->POST('update_image')->checkMethod('set_defaults')->method('update_file');
		$this->content->POST('insert_file')->checkMethod('set_defaults')->method('insert_file');
		$this->content->POST('update_file')->checkMethod('set_defaults')->method('update_file');

		$this->content->GET('action=delete')->method('delete');
		$this->content->GET('action=delete_file')->method();
		$this->content->GET('action=up')->method('up');
		$this->content->GET('action=down')->method('down');
		$this->content->GET('action=move_menu')->method('move_menu');

		$this->content->GET('action=disable_menu')->method();
		$this->content->GET('action=enable_menu')->method();
		$this->content->GET('action=disable_template')->method();
		$this->content->GET('action=enable_template')->method();
		$this->content->GET('action=enable_next_menu')->method();
		$this->content->GET('action=disable_next_menu')->method();
		$this->content->GET('action=enable_sub_menu_listing')->method();
		$this->content->GET('action=disable_sub_menu_listing')->method();
		$this->content->GET('action=enable_firstpage_menu')->method();
		$this->content->GET('action=disable_firstpage_menu')->method();
		$this->content->GET('action=register_parent_id')->method();
		$this->content->GET('action=unregister_parent_id')->method();
	}

	function content_list(){

		$this->init();
		$this->content->content_list()->Page('content_list');
	}

	function edit(){

		$this->init();
		$this->content->show_page()->edit()->Page('edit_'.$this->content->page_name);
	}

	function dashboard(){

		$this->content->dashboard()->Page('dashboard');
	}
}
?>