Welcome Guest, Not a member yet? Register   Sign In
Undefined pseudo-variables
#11

[eluser]olimortimer[/eluser]
Right, cracked it!

I run the 'Most Simple Template Library' (http://maestric.com/doc/php/codeigniter_template) on my CI, so the MY_Controller didn't quite work due to the extra step to the template system, so I got round this by defining my common vars in the 'Most Simple Template Library':

Code:
function set($name, $value)
  {
   $this->template_data[$name] = $value;

   // Override common variables
   $common_vars = array(
    'headerjs' => false,
    'nav'  => false,
    'banner' => false
   );

   foreach($common_vars as $k => $v) {
    if(!isset($this->template_data[$k])) {
     $this->template_data[$k] = $v;
    }
   }

  }




Theme © iAndrew 2016 - Forum software by © MyBB