We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26705
    • 4 Posts
    Hello, I’m new to MODx (not to mention CMS). I’m currently setting up my first site using it (love it so far), and I’m wondering if my CSS Classes should be showing up under the "Styles" drop down of TinyMCE (please say yes!). And if so, I’m wondering why they are not. If not, is there any way to allow the content created in the Resource Content window to have classes applied?

    I used FTP to upload my css and js directories into the root folder, but I’m wondering if I should be somehow recreating these pages through MODx directly? I noticed on a lot of the tutorials that many of these type of folders are being illustrated as being located under the assets folder. Any help is very much appreciated for this n00b, thank you! laugh
      Serenity Now!
      • 14951
      • 151 Posts
      Hello there,

      Glad to hear you are having a good time with ModX. It really is a great community and a great CMS.

      To answer your questions, assuming you are using Evo, just log in to your manager (http://www.yoururl.com/manager), go to "Tools => Configuration => Interface & Features" and under "Path to CSS file" enter well....the path to your CSS file.

      As far as to your questions regarding the structure and "assets" directory, this is namely a matter of preference. While it doesn’t necessarily matter where you put things in most cases, I have found that having a common structure for my sites helps considerably when developing. The other benefit to this is that many other developers use this same form of organization, so if you ever take a look at another Modx site, or tutorial you should feel on familiar grounds.

      My typical structure goes as such:

      CSS & Background images go in "assets/templates/mytplname/" -- This makes it easy to switch from one template to another without sorting through a bunch of images and files from another template. It also makes it easy to move the template to another site.

      Content Images (galleries, blog post content, etc..) go in "assets/images". -- This makes them easily accessible from the file manager.

      Javascript files go in "assets/js"


      You can really create any structure you’d like, however this seems to be the common trend and a logical approach.

      Hope this is helpful!

      -Jared
        • 26705
        • 4 Posts
        Thanks Jared, I should have specified that I am using Revo. The location of the settings was a little different, but I did find it and got it working, so thank you very much! laugh

        On the matter of the structure, with Revo the only folder I’m seeing under assets is components. So, I’m wondering if I should still approach it the same as you recommended and set up the files/folders manually (perhaps it’s the same under Evo?). And I’m not aware of a way to save the templates into the file list. I assume they are being saved there automatically but I’m not seeing them as I browse through the tree. Any advice for best practices while using Revolution is much appreciated, I plan to use MODx a lot and would like to get in the habit of setting things up the best way possible, thank you! smiley
          Serenity Now!
          • 26705
          • 4 Posts
          *bump*

          Any help on best practices for file/site structure using Revo as mentioned above? I’ve searched around the forums and other documentation. Lots on Evo but not so much on Revo. Thank you. smiley
            Serenity Now!
            • 3749
            • 24,544 Posts
            It’s really up to you. jtech’s structure would be fine in Revo (and it’s fairly typical). The main thing is to put them in a place that makes sense to you so that you can remember the path when you need to refer to them.

            MODx doesn’t care at all where they are as long as they are in or somewhere below the root directory so they can be accessed by URL. Files with shorter paths will load a fraction of a second faster so some people put the main CSS and JS files in the MODx root directory, but I doubt if it makes any practical difference.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 26705
              • 4 Posts
              Sounds good, thank you very much for the help. smiley
                Serenity Now!