I am very new with CodeIgniter and I am having difficulty in making few things work. I want to have different meta title for each static pages and dynamic pages. Below is the code which I am using for meta title.

Code:
<?php if($title){ echo $title.' - '; } ?><?php echo $settings->sitename;?>
I want to echo $title only on dynamic page and sitename to other pages like home, about and contact us. Is there any way to do it by using if else Statements?