Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Setup the "project" in config


4 Posts   1203 Views


23 March 2011 at 9:04am Community Member, 2 Posts

Each time setting up a project like "mysite" (by default), the name of the folder requires an adaption of the global variable $project to what the name of the folder is - like "mysite => $project = "mysite". For me it's kind of incomprehensible to that every time, even though in many cases there is only one project :-)

what if the core deployment of __config.php for a project/module (mysite) looks like:


global $project;
$project = basename(dirname(__FILE__));

Wouldnt that makes sense? So there will be no need to adapt the __config.php file anymore. of course setting up locales, themes for instance - sure...but isnt that a easier way?



23 March 2011 at 9:54am Community Member, 509 Posts

As far as I am aware, there should only really be one project directory. I cant really see why you would need more than one. If you are running multiple projects from one install, maybe you would do well to look at something like the subsites module (

If you find you are re-using a lot of classes across different installs, then you might be better suited just adding them to your own modules.



23 March 2011 at 5:27pm Forum Moderator, 5511 Posts

what if the core deployment of __config.php for a project/module (mysite) looks like:

Sure, there is no reason it doesn't do that (though would have a slight negative impact on performance). The $project variable will likely be deprecated in 3.0 with the yaml configuration which has been discussed on the dev mailing list.


23 March 2011 at 8:29pm (Last edited: 23 March 2011 8:34pm), Community Member, 2 Posts

Thanks Mo, it seems that the subsites-module fills my needs :)

Willr, in addition to Mo's offer, there will be no need to adapt the $project variable any more...and of course, you're right. so when the variable will be deprecated in 3.0, everything's fine for me :D

Thank you both. i'm amazed of the pace how fast you reply to users posts.