title: Nested views | Codeigniter 3
body: <p>I need to neste a view that's already nested...</p>
  
  <p>i mean, i have the view <code>app</code> inside this i have 5 nested views, but i need inside one of these 5 views, anoter nested view</p>
  
  <p>its something like</p>
  
  <pre><code>--&gt; App
  ----&gt; view 1
  ----&gt; view 2
  ----&gt; view 3
  ----&gt; view 4
  ----&gt; view 5
  ------&gt; view 5.1
  ------&gt; view 5.2
  ------&gt; view 5.3
  ------&gt; view 5.4
  </code></pre>
  
  <blockquote>
    <p>Controller</p>
  </blockquote>
  
  <pre><code>// includes
  $data['footer'] = $this-&gt;load-&gt;view('includes/footer', NULL, TRUE);
  
  // App
  $data['menuProfile'] = $this-&gt;load-&gt;view('app/menuProfile', NULL, TRUE);
  $data['sidebarMenu'] = $this-&gt;load-&gt;view('app/sidebarMenu', NULL, TRUE);
  $data['topNavigation'] = $this-&gt;load-&gt;view('app/topNavigation', NULL, TRUE);
  $data['menuFooter'] = $this-&gt;load-&gt;view('app/menuFooter', NULL, TRUE);
  
  // Dashboard
  $data['dashboard'] = $this-&gt;load-&gt;view('app/dashboard/dashboard', $data, TRUE);
  $dataDashboard['dinp'] = $this-&gt;load-&gt;view('app/dashboard/dinp', NULL, TRUE);
  $dataDashboard['dispTitle'] = $this-&gt;load-&gt;view('app/dashboard/dispTitle', NULL, TRUE);
  $dataDashboard['percent'] = $this-&gt;load-&gt;view('app/dashboard/percent', NULL, TRUE);
  $dataDashboard['temp'] = $this-&gt;load-&gt;view('app/dashboard/temp', NULL, TRUE);
  $dataDashboard['velocity'] = $this-&gt;load-&gt;view('app/dashboard/velocity', NULL, TRUE);
  
  
  $this-&gt;load-&gt;view('includes/head');
      $this-&gt;load-&gt;view('app', $data);
  $this-&gt;load-&gt;view('includes/jquery');
  </code></pre>
  
  <p>i tried this way but i got this error </p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Notice
  
  Message: Undefined variable: percent
  
  Filename: dashboard/dashboard.php
  
  Line Number: 10
  
  Backtrace:
  
  File: C:\xampp\htdocs\m2m\application\views\app\dashboard\dashboard.php Line: 10 Function: _error_handler
  
  File: C:\xampp\htdocs\m2m\application\controllers\app.php Line: 34 Function: view
  
  File: C:\xampp\htdocs\m2m\index.php Line: 315 Function: require_once
  </code></pre>
  
  <p>what im doing wrong? (<em>noob at codeigniter</em>)</p>
  
  <p><strong><em>Edit</em></strong></p>
  
  <blockquote>
    <p>App | View</p>
  </blockquote>
  
  <pre><code>&lt;body class="nav-md"&gt;
    &lt;div class="container body"&gt;
      &lt;div class="main_container"&gt;
        &lt;div class="col-md-3 left_col menu_fixed"&gt;
          &lt;div class="left_col scroll-view"&gt;
            &lt;div class="navbar nav_title" style={{border: '0'}}&gt;
              &lt;a href="index.html" class="site_title"&gt;&lt;i class="fa fa-home"&gt;&lt;/i&gt; &lt;span&gt;M2MWare!&lt;/span&gt;&lt;/a&gt;
            &lt;/div&gt;
  
            &lt;div class="clearfix"&gt;&lt;/div&gt;
            &lt;?=$menuProfile?&gt;
            &lt;br /&gt;
            &lt;?=$sidebarMenu?&gt;
            &lt;?=$menuFooter?&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;?=$topNavigation?&gt;
        &lt;!-- PageContent --&gt;
        &lt;?=$dashboard?&gt;
        &lt;?=$footer?&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <blockquote>
    <p>Dashboard | View</p>
  </blockquote>
  
  <pre><code>&lt;div class="right_col" role="main" id="Dashboard"&gt;
        &lt;div class=""&gt;
          &lt;div class="clearfix"&gt;&lt;/div&gt;
            &lt;div class="row"&gt;
              &lt;div class="col-md-12 col-sm-12 col-xs-12"&gt;
                &lt;div class="x_panel"&gt;
                  &lt;div class="x_content"&gt;
                  &lt;div class="col-md-3 col-xs-12 widget widget_tally_box"&gt;
                    &lt;!-- percent --&gt;
                    &lt;?=$porcentaje?&gt;
                    &lt;!-- dinp --&gt;
                    &lt;?=$dinp?&gt;
                    &lt;!-- dinp --&gt;
                    &lt;?=$dinp?&gt;
                    &lt;!-- temp --&gt;
                    &lt;?=$temp?&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Here's an img how display the error in the browser</p>
  
  <p><a href="https://i.stack.imgur.com/vTnYI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vTnYI.png" alt="enter image description here"></a></p>
  
  <p>i need write something, because SO... just ignore this part</p>