Welcome Guest, Not a member yet? Register   Sign In
HMVC structure
#1

[eluser]Ngulo[/eluser]
Hi Guys i'm looking for passing to a HMVC , is there anyone can suggest me the best one extension library for do that?

i see many wiki artices i' can't decide which is best Tongue
#2

[eluser]InsiteFX[/eluser]
I cannot speak for the other users, but I use HMVC.

InsiteFX
#3

[eluser]cmgmyr[/eluser]
I use Modular Extensions from Wiredesignz here. It works great and very easy to implement.
#4

[eluser]Ngulo[/eluser]
Hi guys , really thanks for replying me Smile

i'm still testing HMVC as structure, so i followed installation steps here
https://bitbucket.org/wiredesignz/codeig.../wiki/Home

starting from a CI 2.0.2 clear structure i installed HMVC.

I'm trying loading welcome.php controller from home.php controller located to application/controllers/home.php

i setted up also $route['default_controller'] = "home"

so i do :

home.php

Code:
<?php
class Home extends MX_Controller{

    function index(){

        
        $this->load->view('home_view');
    }
}

home_view.php
Code:
<?php echo modules::run('welcome/welcome');?>
but i still getting blank page going to www.mysite.com/index.php/home

thinking something i forgot from bitbucket installation steps .. uhm
#5

[eluser]Ngulo[/eluser]
my app structure is like so:

application
- controllers
- home.php
- models
- views
- home_view.php
- modules
- welcome
- controllers
- welcome.php
- views
- welcome_message.php
- models
#6

[eluser]cmgmyr[/eluser]
If you take out
Code:
<?php echo modules::run('welcome/welcome');?>
and replace it with a regular string, does everything load properly?
#7

[eluser]InsiteFX[/eluser]
As cmgmyr said you do not need the module::run, just leave the default controller in application.config/routes to welcome and it should run!

InsiteFX
#8

[eluser]Ngulo[/eluser]
[quote author="cmgmyr" date="1303709364"]If you take out
Code:
<?php echo modules::run('welcome/welcome');?>
and replace it with a regular string, does everything load properly?[/quote]

yes !


maybe i didn't understand HMVC logic, i mean, what to do and what i can do with regular application/models,application/views,application/controllers ?

need to delete them using only modules? or modules are parts i can load into regular application/controllers or views?


thanks guys Wink
#9

[eluser]InsiteFX[/eluser]
No you should not delete the folders!

You can still use the normal CI folders along with the module folders.
#10

[eluser]Ngulo[/eluser]
ohhh man you're right, my mistake was :

Code:
<?php echo modules::run('welcome/welcome');?>

to replace with

Code:
<?php echo modules::run('welcome/welcome/index');?>

now it works! Wink




Theme © iAndrew 2016 - Forum software by © MyBB