With Revo 2.0 where are you guys placing your template support folders and files for CSS, images and javascripts etc?
Do these go inside the Templates folder that is within the Manager folder? With Evolution the template support files were added to the Assets folder...
I wouldn’t put them into the manager folder. Like in Evo, I place them in subfolders of assets, f.e. assets/css/, assets/site/templates/ a.s.o.
-
MODX Staff
- 10,725 Posts
Because everything in Revo is configurable. MODx has never dictated where your external web assets go and in Revo we take it further by not automatically including an "assets" folder. Tutorials and guides aimed at those inexperienced with MODx at all are definitely in the works, but our answer on this particular topic has always been that you have freedom to store and use external web assets from wherever you need/want to. This is not really a change from Evo other than the distribution does not include the assets directory (simplifying the core upgrade process).
Jason, I totally get that.
But I am thinking out loud here. When folks build sites they will have folders of images, CSS and javascripts. If they deploy a new CMS a common question is "OK, where does my stuff go?" Back in the day when I first downloaded eight or so different CMS platforms this was one of my first questions.
There is no doubt that the main strength of MODx is the freedom to do things your own way. No argument there.
The common convention with Evo was placing your custom template files inside the Assets folder. When you install Revo there is no Assets folder. But once you use the Package Management system you will then have a new Assets folder (contains the new snippets you install.)
I think most users of MODx are used to not placing their template files inside the Manager folder, no? But with Revo the only Templates folder is inside the Manager folder.
Maybe the documentation should say something about this? A simple "you can place your custom template files anywhere you like except in the following folders..." Obviously Revo developers will get into the habit of placing their template files in a regular location. Offering new users some insight to doing this might be helpful, no?
One of the things I notice with the core developers and experienced users of such systems is that they often assume that what is obvious to them is common knowledge to new users and folks who are testing new flavors of the system...
I have two ways of doing it.
If only one site is going to be in the install, I use the following structure
/site/
/site/_css/
/site/_images/
/site/_js/
/site/templates/
If I have more than one site (using contexts for subdomains, etc), I do
/sites/
/sites/domain.com/
/sites/domain.com/_css/
/sites/domain.com/_images/
/sites/domain.com/_js/
/sites/two.com/
/sites/two.com/_css/
/sites/two.com/_images/
/sites/two.com/_js/
That’s just how I do it. I also have a folder for plugins, snippets under site/ or sites/
I like and am used to the way Evo does it...
So I create assets/templates/the_website_name/and put the
templates (tplHome.php), css, /img and /js there.
You will notice that the components are also stored in this
way (i.e. assets/components).
Revo has enough new stuff for me to learn that it is not worth
to change this simple things... just my own way...
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
-
☆ A M B ☆
- 80 Posts
I place front end templates into the assets folder:
assets/templates/
assets/templates/images/
etc.
Then I place user managed files in a share folder:
share/files/
share/flash/
share/images/
etc.
This was a simple way to isolate user managed files from components and templates.
Time is what keeps everything from happening all at once.