title: Quitting Smarty to do it manually
body: <p>I am facing the problem that I'm not really sure how to develop without a framework or a template engine. I started coding that way and now I want to go to basics.</p>
  
  <p>I used to work with this MVC schema, using Codeigniter and Smarty as a template engine. What I want to do now is to use raw php without both tools mentioned.</p>
  
  <p>I don't know how to "copy" the concept of Smarty's "block" and "extends".</p>
  
  <p>I used to define a base.tpl file which had html head, only the body tag, and the base css and js files (the ones that are always used in every page of the site), like this: (snippet)</p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
   &lt;head&gt;
   &lt;meta charset="utf-8" /&gt;
   &lt;title&gt;Dashboard&lt;/title&gt;
   &lt;meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" /&gt;
   &lt;meta content="" name="description" /&gt;
   &lt;meta content="" name="author" /&gt;
  
   &lt;!-- ================== BEGIN BASE CSS STYLE ================== --&gt;
   &lt;link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"&gt;
   &lt;link href="{site_url()}assets/css/animate.min.css" rel="stylesheet" /&gt;
   &lt;!-- ================== END BASE CSS STYLE ================== --&gt;
  
   &lt;!-- ================== BEGIN PAGE LEVEL CSS STYLE ================== --&gt;
   {block name='custom_css'}{/block}
   &lt;!-- ================== END PAGE LEVEL CSS STYLE ================== --&gt;
  
   &lt;!-- ================== BEGIN BASE JS ================== --&gt;
   &lt;script src="{site_url()}assets/plugins/pace/pace.min.js"&gt;&lt;/script&gt;
   &lt;!-- ================== END BASE JS ================== --&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="page-container" class="fade page-sidebar-fixed page-header-fixed"&gt;
      &lt;div id="header" class="header navbar navbar-default navbar-fixed-top"&gt;
          &lt;div class="container-fluid"&gt;
              {include file='base/header.tpl'}
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- BEGIN PAGE --&gt;
      &lt;div class="page-content"&gt;
          &lt;!-- BEGIN PAGE CONTAINER--&gt;
          &lt;div class="container-fluid"&gt;
              &lt;!-- BEGIN PAGE HEADER--&gt;
              &lt;div class="row-fluid"&gt;
                  &lt;div class="span12"&gt;                        
                      &lt;!-- BEGIN PAGE TITLE &amp; BREADCRUMB--&gt;
                      {include file='admin/base/breadcrumb.tpl'}
                      &lt;!-- END PAGE TITLE &amp; BREADCRUMB--&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;!-- END PAGE HEADER--&gt;
              {block name='content'}{/block}
          &lt;/div&gt;
          &lt;!-- END PAGE CONTAINER--&gt;    
      &lt;/div&gt;
      &lt;!-- END PAGE --&gt;
  </code></pre>
  
  <p>and then when I need to call this base.tpl I did this:</p>
  
  <pre><code>{extends file='base/base.tpl'}
  
  {block name='custom_css}
     &lt;link href="{site_url()}assets/css/pages/blog.css" rel="stylesheet" type="text/css"/&gt;
   {/block}
  
  {block name='content'}
     &lt;div class="row"&gt;
        &lt;div class="col-md-3 col-sm-6"&gt;
          &lt;div class="widget widget-stats bg-green"&gt;
          &lt;div class="stats-icon stats-icon-lg"&gt;&lt;i class="fa fa-globe fa-fw"&gt;&lt;/i&gt;&lt;/div&gt;
          &lt;div class="stats-title"&gt;TODAY'S VISITS&lt;/div&gt;
          &lt;div class="stats-number"&gt;7,842,900&lt;/div&gt;
          &lt;div class="stats-progress progress"&gt;
              &lt;div class="progress-bar" style="width: 70.1%;"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="stats-desc"&gt;Better than last week (70.1%)&lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>I have been searching but I am affraid I'm missing the right words to search because I am not finding answers.</p>
  
  <p>I would like to be guided please!</p>