Welcome Guest, Not a member yet? Register   Sign In
Avoid including header in each template file (Smarty)
#1

[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




Theme © iAndrew 2016 - Forum software by © MyBB