Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - Version 4.3
#41

[eluser]wiredesignz[/eluser]
@yingyes:
The CI library issue is resolved in 4.0.5 Thanks Wink
The loader should already be able to scan directories for files such as "home/home_page/home_page_a"
#42

[eluser]Avatar[/eluser]
nope, sorry. to load a sibling module I have to do this down the tree.
Code:
'content'=>modules::run('home/modules/home_page/modules/home_page_a/home_page_a',$data),
maybe if there was a check for this and it maps it to the corresponding module?
NOTICE: home is a module, home_page is a module within it and home_page_a is one with in home_page

In directory structure as well. for the views directory in each and every module i created a ln in the file system to point to my smarty templates folder and its great. I prefix all smarty tpl files with tpl_ and ci no prefix and it will load all module views from tepmlates when using ci parser or if you have environment variable set with the path to the templates you can load them via $this->load->module->view. This is AWESOME....Thanks.
#43

[eluser]Avatar[/eluser]
Hence, that is why I needed that $_parent variable
What is the best way to access that by the way?

This is so awesome after this thing is done you will only need to work in the modules and templates directories(respectively)

I have a question from before as well about check module directory structure and create if it doesn't exist(if module not exist create directory within this current module or parent for module name and within in create config,controllers,models,helpers,views, and best for last modules) that can actually be controlled from a config file whether to create directory structure or not.

The reason why I want this I guess is because I see potential for this lib with being able to create templated modules on the fly.

Do you think this is good?

Thanks you.
#44

[eluser]wiredesignz[/eluser]
I would not want to make the loader slower by interpreting nested module directories, anything under a module should be its controllers, liraries and views etc. Maybe you need to review your structure. Tongue

I see you still use $this->load->module->view(), this is deprecated, Please try to use $this->load->view() or your scripts will not work in a future version.
#45

[eluser]Avatar[/eluser]
ok, I will use $this->load->view
#46

[eluser]Avatar[/eluser]
wait, so all sibling modules file should be not in directories but just in the module directory alongside with another sibling modules directory?
Quote:Maybe you need to review your structure. raspberry
yes, I do. I'm just working on it as I go I figure out what is the best way.
#47

[eluser]wiredesignz[/eluser]
I am not sure others will want to nest modules this way yingyes, plus it adds time to loading if we need to search this deep, especially when you know where the module is already.

The best way is to consider that a module is a self contained component (mini application). Anything under it, is a library, not a module.
#48

[eluser]badgeek[/eluser]
thanks wiredesignz its work now, i have another problem when loading module controller
i place it in application\modules\search_module\search_module.php

i think this is missed in loading sequence because when im loading it

Unable to find the requested file: search_module/controllers/search_module.php

thanks
#49

[eluser]Avatar[/eluser]
badgeek: can I see your code? how are you loading it?
#50

[eluser]badgeek[/eluser]
on controller

Code:
function _remap($value)
    {
        
        $this->load->helper('Modules');
        
        switch ($value) {
            case 'index':
                echo modules::run('search_module');
                break;
            
            default:
                echo "do nothing";
                break;
        }
    }

thanks




Theme © iAndrew 2016 - Forum software by © MyBB