ethanbeyer Posted June 13, 2017 Posted June 13, 2017 I've built a couple PW sites now, and often I break my directories up like this: assets files cache logs sessions active.php index.php installed.php backups fonts js modules scss templates vendor But I kind of wish, in that schema, that I could change it to something like this: modules resources fonts js images scss storage backups cache files logs sessions active.php index.php installed.php templates vendor My reasoning is that JS/CSS/Theme Images/Fonts are site assets (or "resources"), while the caches/files/logs/sessions are more storage. And that is fine to set up manually - but in looking over the config.php file, I can't find a place where I can set that so that ProcessWire will respect it. Every part of this CMS is flexible, so I do assume there is a way to do this - I just don't know what it is. Has anyone else done something like this?
Macrura Posted June 13, 2017 Posted June 13, 2017 i keep everything for the front end in the templates folder, since a lot of modules and such use the templates directory as the assumed location of the fonts, js, css files... i tried a long time ago to keep some things outside of templates, but it didn't really help and was somewhat annoying to deal with... i can't see any reason why templates folder can't hold everything, plus then you can use alternate template folder setup for testing and development (like templates-dev)... and have a completely separate independent copy of all those things 5
zota Posted June 13, 2017 Posted June 13, 2017 3 hours ago, Macrura said: ... plus then you can use alternate template folder setup for testing and development (like templates-dev)... and have a completely separate independent copy of all those things ! Interesting. You use a «complete copy»? Is it handy? can you, please, give some more tips? thanks
Macrura Posted June 14, 2017 Posted June 14, 2017 I have used that technique (as described here: https://processwire-recipes.com/recipes/use-different-sets-of-template-files/ ) for developing a whole new frontend while the site was live and then replaced the whole templates directory when the new one was done... 3
szabesz Posted June 14, 2017 Posted June 14, 2017 15 hours ago, zota said: can you, please, give some more tips? Also, you can use @adrian's Tracy Debugger module to use different template files temporarily: https://processwire.com/blog/posts/introducing-tracy-debugger/#template-path-panel 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now