10390 Posts in 2202 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 966 Views |
-
Setup the "project" in config

23 March 2011 at 9:04am
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:
<?php
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?
cheers
-
Re: Setup the "project" in config

23 March 2011 at 9:54am
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 (http://silverstripe.org/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.
Mo
-
Re: Setup the "project" in config

23 March 2011 at 5:27pm
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.
-
Re: Setup the "project" in config

23 March 2011 at 8:29pm Last edited: 23 March 2011 8:34pm
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
Thank you both. i'm amazed of the pace how fast you reply to users posts.
| 966 Views | ||
|
Page:
1
|
Go to Top |



