As promised, here is our display model (slightly simplified):
<?php class Display extends Model { /*create the array to pass to the views*/ var $data = array(); /*two other class variables*/ var $base; var $status = ''; /*the constructor function: this calls the 'model' parent class, loads other CI libraries and helpers it requires, and dynamically sets variables*/ function Display() { parent::Model(); $this->load->helper('form'); $this->load->library('user_agent'); $this->load->library('menu'); $this->load->library('session'); /*now set the standard parts of the array*/ $this->data['css'] = $this->config->item('css'); $this->data['base'] = $this->config->item('base_url'); $this->base = $this->config->item('base_url'); $this->data['myrobots'] = '<meta name="robots" content="noindex,nofollow">'; /*note that CI's session stuff doesn't automatically recall the extra variables you have added, so you have to look...