794 Posts in 408 Topics by 304 members
|Go to End|
26 May 2009 at 3:06am Last edited: 26 May 2009 3:10am
I usually dump all of my widgets in the silverstripe folder which makes a bit of a mess. I tried putting them in a /silverstripe/widgets/ folder but SS couldn't find them in there.
But! I recently discovered that you can stick them in mysite/ and even in mysite/widgets/.
I prefer the latter - nice and tidy.
In fact SS seems to go on a little hunt through any old folder you create in mysite, so, should you feel inclined, you can probably rearrange other stuff too.
The downside to this is that you can't have an codeOld folder in mysite for example because SS will load that code too.
19 June 2009 at 9:30pm
Actually it seems there is a little flaw in my logic here; it seems that Silverstripe expects to find its config files (_config.php) in an immediate sub directory of silverstripe (eg silverstripe/mywidget/_config.php) so this doesn't actually work properly.
(It just looked like it did because all of the widgets I was using didn't have anything in their _config.php files so it didn't matter that thy weren't being found.)
It would be nice if SS did search for _config.php files in the same way it looks for normal .php files then you could organise you file structure as required.
2 August 2009 at 10:58pm
The way I do it is:
Works fine and you can put all the widgets in the same folder .
|Go to Top|