Reputation: 4896
Hi There need assistance here(specially those fuelphp developers),
I'm having these set-up on the fuelphp where I am using a module implementation. Below is my current set-up:
app
-modules
--design
---classes
---views
----admin
-----index.php
On my controller Controller_Admin I'm putting the code:
$this->template->notification = \View::forge('common/notification.php');
It cause an error:
The requested view could not be found: common/notification.php
How can I load a view from my controller on my module? Any thoughts. Thank you.
Upvotes: 0
Views: 1322
Reputation: 1
<?php
namespace Adm;
class Controller_Adm extends \Controller {
public static function action_index() {
return \Response::forge(\View::forge('adm::adm/index'));
}
}
a estrutara de pastas é assim:
app
-modules
--adm
---classes
----controller
----model
----views -> viewsModels
---views -> views templates, páginas, html, etc
----adm
-----index.php
Upvotes: 0
Reputation: 4896
I recently figured it out. I need to use the scope resolution (::) on this. :-) It works, I replaced my code to this:
$this->template->notification = \View::forge('design::common/notification');
Removing the extension and adding the module name with scope resolution solves the problem. :)
Upvotes: 2