We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15918
    • 2 Posts
    Hi Folks!
    I created a (still very) simple template using Dreamweaver. I also created an external css-file which is linked in the template file like this:
    <link rel="stylesheet" type="text/css" href="css/style_01.css">

    Now I have copied the template-sourcecode to the modx manager (created a new template) and applied the template to the content. The site now is displayed with the new created template but WITHOUT ANY STYLE, as i did not upload the css-file anywhere yet.

    My question:
    How can I apply my custom css-file to the template? I did not find any place to upload the css-file and no place where the template itself is stored. Or must I copy the css-sourcecode anywhere like I did with the template?

    I’m looking forward to your helpful hints...
    Thanks a lot!
      • 7455
      • 2,204 Posts
      templates are stored in the database

      css files needs to be uploaded with ftp in your case create a folder in your "site root" called css and upload your css file there.
      now this should work

      Dimmy
        follow me on twitter: @dimmy01
        • 15918
        • 2 Posts
        Thank you!

        Did not imagine it to be so easy...
        I Think it`s the same with any file linked in the template to start paths with te root folder...?

        Very helpful.
          • 6726
          • 7,075 Posts
          Once you’re conformtable with MODx you could also use this technique : CSS as a MODx document.

          See http://modxcms.com/forums/index.php/topic,625.msg3500.html#msg3500
          and http://modxcms.com/forums/index.php/topic,4201.0.html
          (I have done a tutorial, but in french for the moment, I’ll try to take the time to translate...).

          Then your CSS is also stored in database and more importantly, it’s parsed thus you can use things like [(site_url)] to keep path consistent when you move/transfer your site smiley and chunks to build modular CSS... once you get used to this method, you don’t come back to the old one grin
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 26799
            • 177 Posts
            I’ve run across this CSSmodx doc option, like five time, I still do not understand how it works.

            then again I’m having trouble using friendly urls.

            so to translate the tutorial would be awesome, thanks for contributing

            Gary
              • 27910
              • 48 Posts
              How about having a "function" or something which could handle CSS files? Like the HTML files for the templates, it could handle the CSS files for a template as well, and maybe even store templates in the same place as the default template is being stored, in /assets/templates

              for example /assets/templates/my_template
                cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill :: Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program :: Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
                SoftDux- The Leaders in Software
                Use the coupon: modx to get 20% off our packages
                • 6726
                • 7,075 Posts
                Quote from: seventhapex at Jun 16, 2006, 09:41 AM
                I’ve run across this CSSmodx doc option, like five time, I still do not understand how it works. then again I’m having trouble using friendly urls.
                so to translate the tutorial would be awesome, thanks for contributing
                Gary

                Ok then, it’s done !

                http://modxcms.com/forums/index.php/topic,5258.0.html

                I hope this is helpful...

                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 27910
                  • 48 Posts
                  hmmm, interesting concept. Will try it out tomorrow and see how it works....
                    cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill :: Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program :: Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
                    SoftDux- The Leaders in Software
                    Use the coupon: modx to get 20% off our packages
                    • 26799
                    • 177 Posts
                    Very powerful stuff, using friendlyURLS makes this work essentially like a root structure, with folders and sub folder, I’ve got it working and running great, goodbye save/upload process, I’m done with that crap for good... ModX Rocks!

                    Thanks for the explanation, it’s really not that complicated, it’s just a little more than a newb can grasp at first. I actually figured it out by reading through and pasting several post together in my mind...