I am very new to CodeIgniter, but I think I understand how this works.
Usually, when I create a site, for example a 5-page site, I have a header file in the php file that is included on each page, so if I need to change the title, I need to do this in only one instead of changing it to five time.
In my CodeIgniter application, I have a function for each page of my controller that loads a different view, depending on the function. For instance,
public function Index() {
$data = array();
$this->load->view('index',$data);
}
public function blog() {
$data = array();
$this->load->view('inner1',$data);
}
Then I can put all my logic in the controller.
What is the best way to have one link title? Should I put it in the controller as a variable and then send it as data for each view?
Also, if there is a more efficient way to do this, suggest it!
Thank!