Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] HMVC current module path
#1

[eluser]Davide Bellini[/eluser]
Hi guys!
I'm integrating Twig Template library in CI with HMVC.

I want insert html template page in module/views folder, like this :

- module_name
- controllers
- module.php
- models
- module_model.php
- views
- module_view.html
- module_view1.html
- ...

How can I retrieve current module "views" path??
I've to set this path in Twig_Loader_Filesystem(array("MODULE_VIEWS_PATH"));

Cheers


UPDATE :
I found a solution for my problem ... I've used :
Code:
$module_info = Modules::find($view_name, $this->router->class, 'views/');
$module_view_path = (isset($module_info[0])) ? $module_info[0] : '';
$module_view_name = (isset($module_info[1])) ? $module_info[1] : '';

and retrieve :
Code:
array(
[0] => 'C:\WEBROOT_PATH/application/modules/test/views/'
[1] => 'test.html'
)

Hope this is helpful


Messages In This Thread
[SOLVED] HMVC current module path - by El Forum - 03-30-2011, 06:25 AM
[SOLVED] HMVC current module path - by El Forum - 04-04-2012, 07:58 PM
[SOLVED] HMVC current module path - by El Forum - 06-01-2013, 02:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB