CodeIgniter Forums

Full Version: Avoid including header in each template file (Smarty)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]blaff[/eluser]
Hello,

I have included Smarty in my CodeIgniter framework. Now when I display a template i have to include headers all the time.

Example on main.tpl:
Code:
<html>
   <head>
   </head>

   <body>
      {$content}
   </body>
</html>

Instead I want to include one base.html with all html, head and body tags. Then the other templates will be included in the variable $content.

Anyone who have a good solution for this?

Best regards,
Mikael