[eluser]Avatar[/eluser]
Yes, the parent is a good idea. When placing modules inside of other modules there is a need for a parent variable so that we can distinguish what is parent and how far down it goes down the tree. I want module to do different stuff if it's a child and/or has a parent module or it the parent by itself. Just don't see how without a parent variable.
At the moment I would have to load a module inside another module like so:
Code:
'content'=>modules::run('home/modules/home_page/home_page',$data),
home being the parent module and homepage being the sibling. Also notice how I have to write home_page/homepage in order for it to work. What if this sibling had another sibling? we need a variable to track this and stuff.
Maybe also if we make the modules array to be accessible by other modules and/or controllers, would be nice.
I've added $modules below,
Code:
class Modules
{
var $modules=array();
function & load($modules, $base = 'controllers/')
Thank yous