1042 Posts in 379 Topics by 372 members
|Go to End|
29 March 2010 at 4:55am
What would be the best way to upgrade silverstripe?
And on a sidenode, whats the best way to keep customisations away from the core?
I feel php applications always are a pain to update
ruby on rails app is more simple with git
29 March 2010 at 8:10pm
You'll find with SS that you should be able to customize most of the functionality by using decorators and subclasses which are keep in your mysite folder and themes which need to be overridden can be from your own templates folder. This applies to css and templates for core, modules. Directly editing the core sapphire or cms folders as you say can be a very bad idea and hard to maintain.
If you're hacking the core to fix a bug, then if its a valid bug make a ticket / patch for it to be included in core. I mean every apps going to be a pain to update if you hack around with the core. If you used to git you can always try out git-svn to 'manage' svn like git. I find like git but managing svn externals are a bit of a pain.
13 April 2010 at 1:13am Last edited: 13 April 2010 1:15am
As Will said, I will NEVER edit the files in:
It is so easy to extend sapphire's core classes that there is very little need to do so. If you simply subclass the original core class, all the original functionality is there for you to tinker with without touching the main classes.
The advantage of Git you speak of with RoR is exactly the same on Silverstripe using Subversion. I use it to update core all the time.
22 July 2010 at 9:32pm
What about when customizing the css or .ss files for a module?
Is there an easy way to preserve these and keep php code upto date with SVN?
23 July 2010 at 10:37am
The convention here is to create a module sub-theme of you theme which looks like: themes/mytheme_module take a look at blackcandy_blog as an example.
You can add templates and css to your hearts content knowing that your changes will not get overwritten by a module update, although you may need to update them to include any API changes.
If you want to change php code for a module then you're best off decorating it instead of editing module code.
23 July 2010 at 8:35pm Last edited: 23 July 2010 8:36pm
Thanks for your reply TotalNet.
I'm glad to hear that themes/mytheme_module will overwrite default templates.
However, Im having trouble extending an existing module. Can you see this thread?
|Go to Top|