Welcome Guest, Not a member yet? Register   Sign In
Modular Extension sub-folder views
#1

[eluser]fatnic[/eluser]
Hi.

Dows anyone know if the ME HMVC library supports views in sub-folders?

I have a structure like this
Code:
\modules
\test
  \controllers
     - test.php
     - test2.php
  \views
     - index.php
     \test2
       - index.php

I'm trying to load up test2 index view with
Code:
$this->load->view('test2/index);
However the module seems to be ignored and it's looking in the default view folder. Is there a workround?
#2

[eluser]OES[/eluser]
Yes is the simple answer just like you put.

Lee
#3

[eluser]fatnic[/eluser]
Sorry, but I don't see where I answered my own question.
#4

[eluser]OES[/eluser]
Is your normal view loading ie.

$this->load->view('index);

If so by putting:

$this->load->view('test2/index);

index should be in the folder.

modules
--test
----views
------test2
--------index.php

Does this make sense ?

Hope it does.
#5

[eluser]fatnic[/eluser]
Sorry if my folder structure isn't clear but there is an index.php in the test2 folder. There are two index.php files. One in the views folder and one in it's sub-directory.
#6

[eluser]OES[/eluser]
No problem my post was not that clear.

Ok so you have your modules folder.

Code:
modules
--test
----views
------index.php
------test2 (folder)
--------index.php

Does this make better reading ?

Hope it clears it up.

Lee
#7

[eluser]fatnic[/eluser]
Yes. That is exactly how I have it now.




Theme © iAndrew 2016 - Forum software by © MyBB