Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - HMVC version 5.2

[eluser]Milos Dakic[/eluser]
Found a small bug/annoyance. Since I use the modules folder for everything, there is no need for me to have a blank 'controllers' folder in the root application directory. If you remove that directory, your default controller would fail to load. I think it should work if the folder is there or not.

[eluser]wiredesignz[/eluser]
Hi Milos, Can you try this again with version 5.2.15, I have an application that appears to work ok without a controllers directory.

[eluser]Milos Dakic[/eluser]
An Error Was Encountered

Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.

[eluser]wiredesignz[/eluser]
Modular Extensions HMVC version 5.2.16 is now available on the wiki.

Updated to allow loading an array of libraries.

[eluser]wiredesignz[/eluser]
Modular Extensions HMVC version 5.2.17 is now available on the wiki.

Updated to fix a bug where controller argument variables are set to NULL.

[eluser]matt2012[/eluser]
(Apologize for cross-posting on wiki thread)

Im just experimenting and ive created a clean install

ive created a controller welcome that loads a view in the normal application directory
this view contains the line
Code:
echo modules::run('core_bits/welcome/get_header');

I then created a module called core_bits in modules that has a controller welcome that references a view in its directory under the method get_header.

when I go to
Code:
http://dev.mydomain.com/welcome

I get my welcome message but not the view from my module and no error message.

if i go to

Code:
http://dev.mydomain.com/core_bits/welcome/get_header

I get the partial I wanted.

if I change the line to
Code:
echo modules::run('sdasaf/sadf/asdf');

I still get no error

but if I change it to
Code:
echo modules2::run('core_bits/welcome/get_header');

I get
Code:
Fatal error: Class 'modules2' not found

so it recognising the class but not apparently running it right

I know there is some schoolboy error here but I cant see it

any help appreciated !

[eluser]wiredesignz[/eluser]
@Matt, Check the wiki thread for a reply.

[eluser]uprocka[/eluser]
I tried to call a controller with htis Module-Call:
Code:
modules::run('subfolder/controller/method/param1/');
this doesn't work, because of the parameter param1 I added to the uri,
but I could not find a reason why this should not be supported too.

What am I missing?

Thank you in advance for any hint.

[eluser]wiredesignz[/eluser]
Parameters need to be separate from the URI string, apologies if the wiki is not clear.
Code:
<?php echo modules::run('module/controller/method', $param1); ?>

[eluser]uprocka[/eluser]
Thank you for your reply! now it works! ;-)

another question/problem I came across (same as following post):
http://ellislab.com/forums/viewthread/88168/

I use $this->load->model('Test_model'); like it is recommended in the User Guide.
codeigniter searches for the class Test_model in the file test_model.php

But Modules seems to search for Test_model in the file Test_model.php (which doesn't exists)

Shouldn't the function in Modules work the same as CI does?




Theme © iAndrew 2016 - Forum software by © MyBB