Welcome Guest, Not a member yet? Register   Sign In
Calling View File
#1

[eluser][email protected][/eluser]
Hi

I have the following inside HMVC which i created function called home within dashboard file and i am calling admin inside home function which is also is inside dashboard.Then i am trying to displaying links inside page called home which is inside view with module dashboard but it does not show the the links inside it

app
-modules
-dashboard
-controller
-dashboard.php
-view
-home.php
-template
-view
-admin.php
-public_one_col.php

Here are there

<?php

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Dashboard extends MX_Controller
{

function __construct() {
parent::__construct();
Modules::run('site_security/make_sure_is_admin');
}

function home(){

$data['view_file'] = "home";
$this->load->module('template');
$this->template->admin($data);
//echo Modules::run('dashboard/home',$data);
}

}

<h2>Dashboard</h2>

<p>Please choose from the following options</p>
<ul>
&lt;?php
//$this->load->view($view_file);

echo anchor('webpages/manage', '<li 20px;">Content Management System</li>');
echo anchor('', '<li 20px;">Update Top Navigation</li>');
echo anchor('', '<li 20px;">Sign Out</li>');
?&gt;
</ul>








#2

[eluser]InsiteFX[/eluser]
If you looked at the view file you would see that you are missing a lot of the code.

Code:
&lt;?php
if ( ! isset($view_file))
{
  $view_file = "";
}

if ( ! isset($module))
{
  $module = $this->uri->segment(1);
}

if (($view_file != "") && ($module != ""))
{
  $path = $module."/".$view_file;
  $this->load->view($path);
}
else
{
  echo nl2br($page_content);
}
?&gt;




Theme © iAndrew 2016 - Forum software by © MyBB