where to place my files in concrete5 directory structure so they won't get erased?

Permalink
This webpage does a nice job listing the concrete5 directory structure:

http://www.concrete5.org/documentation/developers/system/directory-...

but as a newbie, I would like to know which directories are intended by the CMS for me to place my custom files, so they won't get erased or overwritten when updates to the CMS/themes/add-ons occur.

Can someone explain typically where a safe location is to place my custom files (images, PDF files for users to download, css files, etc.)?

Or, are all directories safe except the "concrete" one?

Hoping someone can help point me in the right direction so I don't end up getting in trouble later. Thanks in advance for any advice.

 
INTcommunications replied on at Permalink Reply 1 Attachment
INTcommunications
If you place them off the root - you can upgrade the core ( the concrete folder in your root ) or any theme. You just have match the folder structure to get to the file. Put this on another thread earlier ( see attachment ) if for sample sake you wanted to modify the main.css of the greek yogurt theme - you would go to the root open the
themes folder and put a folder named greek_yogurt on - open that folder and copy in the main.css into that folder and it will override the one that is actually in the core.

This works with pretty much everything else too - find the right folder on your root and then build the folder structure to the file. You can copy whole themes like this - rename and install it and edit it all you want without touching the original.
but if there is an update it won't update your copy - you would then have to figure what has changed and copy it over to your folder manually.
jwapp replied on at Permalink Reply
Thanks for the information. I'm still trying to understand, if I place a custom file in each of the following directories, which directories would the custom file remain in after an upgrade (of concrete5/theme/add-on/etc.)?

blocks
concrete
config
controllers
elements
files
helpers
libraries
mail
models
single_pages
themes
tools
config
css
flash
helpers
images
js
libraries
models
packages
startup
tools

Are you saying that, since this directory structure (e.g. in the root) is replicated in the "concrete" directory, ALL of these directories in the root (except the "concrete" folder) will NOT be modified during any update?
INTcommunications replied on at Permalink Reply
INTcommunications
All those folders share data with any theme that you have installed. So placing a block in the blocks folder means that you can switch themes and still have access to the blocks there. But if you want css just for one theme - you would do it the way that I showed you by building the same folder structure from the root. So if you put a footer.php in the elements folder - any theme you had that had an include pointing to elements/footer.php would override the one in the theme and would be in any theme that is in that installation. This is designed this way intentionally so say for a client you could have several choices for themes that they could switch to. Some things may be the same but others like gui images etc. would only be in the perspective folder for a theme.
exchangecore replied on at Permalink Reply
exchangecore
Jwapo,

Here's a link about the C5 directory structure:
http://www.concrete5.org/documentation/developers/system/directory-...

Now for my abridged version (and possibly slightly lacking) of it. The Concrete5 core is typically found in one of two locations. Either in the /concrete folder or in /updates/concreteX.X.X.X/. So it is best to stay as far away from modifying these files as possible if you want to be able to update the concrete5 core files. You will also see that the configuration for C5 is inside of /config/ however, this is your configuration so it should be tweaked to your liking. When you run an update, c5 does modify your config file so that it knows which folder inside of the /updates/ folder has your current version of the core.

As far as your custom css / pdf / etc. Typically i'd say, if you're adding PDF's, use the file manager, that's its purpose in life.

Now when making customizations to your site you can typically take one of two approaches: 1) You can create a package, which contains basically a copy of the root of your site, excluding the concrete5 core files (So single_pages, themes, etc could be found in a package). 2) You can add them to the appropriate folder inside of the web root.

If you want to modify a package or someone else's theme they have published for you to use, the best way to do this is to either a) create your own copy of it so that you can micromanage the updates. b) Extend their theme / package with your own.