Welcome Guest, Not a member yet? Register   Sign In
how dynamic titles
#3

(12-24-2016, 01:12 AM)Wouter60 Wrote: Make sure the page title is in the data array your controller passes to the view.
PHP Code:
$data['page_title'] = 'The title of this page' //assign dynamically
$this->load->view('post-view-file',$data); 

In the head section of your view (or the header part of your template:
PHP Code:
<head>
 
 <title>
 
    <?php if (!empty($page_title)) echo $page_title;?>
  </title>
</head> 

Thanks for the response I already did that. But I want that title to change on every post dynamically for exemple im creating this movie review blog but when i go in every movie the title does not change. http://blog.codigero.com/
Reply


Messages In This Thread
how dynamic titles - by carloz360 - 12-23-2016, 01:52 PM
RE: how dynamic titles - by Wouter60 - 12-24-2016, 01:12 AM
RE: how dynamic titles - by carloz360 - 12-24-2016, 02:41 AM
RE: how dynamic titles - by enlivenapp - 12-24-2016, 07:39 AM
RE: how dynamic titles - by carloz360 - 12-24-2016, 05:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB