TransWikia.com

File Structure in EE

ExpressionEngine® Answers Asked by Payton Burdette on October 3, 2021

Just downloaded EE. Looking to use it for a project. I’m confused on there default file structure, I’ve found where my template lives… I’m just confused on all the other junk in the way.

I would like to have just an assetsenter image description here folder etc. Below is what I have now. Is there a way I can reorganize this but still keep all the necessary EE files in place?

3 Answers

On some sites I start at "default.site" directory as my root. Saves lots of clicking/expanding.

Answered by jphansen on October 3, 2021

This is an old post, but since it was bumped to the homepage, I'll add my 2 cents.

Your assets folder can be where ever you like. If they are public assets you can keep them organized in your web root as is common practice. They do not have to be stored in your templates folder, or within your ee system folder.

I'm not 100% what your asking when you mentioned "I'm just confused on all the other junk in the way." But if it helps, the 'default_site' folder is just that, as ExpressionEngine, via MSM can host multiple sites from one install, so there needs to be a way to identify them in the file hierarchy. You can change the name of your site in the CP from 'default_site' to what you prefer. The 'blog.group' folder indicates your template group as you see it in 'Template Manager' within the CP. It would translate to the path/url yourdomain.com/blog/index.

Answered by Jeremy on October 3, 2021

Yes and no.

No, you can't totally reorganize the system/user/templates structure - ExpressionEngine needs the basic filesystem layout to be in place in order to work.

Yes, you can do as you please in your template directory (it looks like you are using default_site). You already have a blog.group directory, so you can make an assets.group directory along side of it to store your asset files. Any other template files you create would reference your asset files like this:

<link rel="stylesheet" href="{site_url}system/user/templates/default_site/assets.group/style.css" />

For what it is worth, I am in the habit of moving the system directory above the document root and creating a symbolic link from the document root to my template's asset directory, like so:

css -> ../system/user/templates/default_site/assets.group/css
fonts -> ../system/user/templates/default_site/assets.group/fonts
img -> ../system/user/templates/default_site/assets.group/img
js -> ../system/user/templates/default_site/assets.group/js

This makes the site a bit more secure and makes asset pathing cleaner.

Answered by Will Diaz on October 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP