I\'m a very newbie on CodeIgniter, and while I go on I run into problems that, in the procedural coding, were easy to fix
The current issue is: I have this controlle
Why not user a helper?
File:
/application/helpers/meta_helper.php
Content:
null, "robots" => "noindex, nofollow" );
}
In your controller:
class Basic extends Controller {
function __construct(){
parent::__construct();
$this->load->helper('meta');
}
function index(){
$data['meta'] = meta_data(); //associate the array on it's own key;
//if you want to assign specific value
$data['meta']['title'] = 'My Specific Page Title';
//all other values will be assigned from the helper automatically
$this->load->view('basic_view', $data);
}
And in your view template:
Will output:
My Specific Page Title
Hope that makes sense :-)!