HMVC Partials |
[eluser]vile[/eluser]
Hi, im new to HMVC and i found CI HMVC (http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/) i have a simple problem in calling the module in view. Heres my code in modules/welcome/view/welcome Code: <?php echo modules::run('admin/welcome'); ?> modules/admin/controller/welcome Code: class Welcome extends Controller { modules::run('admin/welcome') I'm expecting to see letter 'a' but displays a blank page. Can anyone help me please. thank you
[eluser]lexusgs430[/eluser]
mmmm I think you may need to specify the index function as the third parameter there, try Code: <?php echo modules::run('admin/welcome/index'); ?> if that does not work, try creating a new function such as admin/welcome/test, and then running that. And if all else fails, try moving the echo "test" into a view file in the admin section, then load that view via the module you are calling as normal -- $this->load->view('test'); Im guessing one of those should fix the prob. Ive been using HMVC for past 3 days or so and it can do some amazing things once you get the hang of it. |
Welcome Guest, Not a member yet? Register Sign In |