We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23330
    • 3 Posts
    This is going to turn out to be a really stupid question I’m sure, but I’m playing around with ModX for the first time and no matter what I do, I cannot get my templates to grab external style sheets. The default template works fine... what am I doing wrong in the templates I upload/create? I’ve tried three different premade ones, I’ve created my own from scratch, tried different directories... it’s probably just an issue of formatting the link wrong because various chunks will load, only the .css files are a problem.

    this is what’s in my template. I’m trying SimplicityX at the moment:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>RPO, Inc.</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/SimplicityX/default.css" type="text/css" media="screen" />
            <base href="[(site_url)]" />
    </head>
    <body>
    [*longtitle*]
    {{simpTopNav}}
    [*content*]
    {{simpNews}} {{simpDownloads}}
    {{simpFooter}}
    </body>
    </html>


    Now this is the call in the default template, which works fine:

    	<link rel="stylesheet" href="[(base_url)]assets/templates/default/site.css" type="text/css" media="screen" />
            <base href="[(site_url)]" />


    When I copy/paste the link in the default template into one I newly create, it points to that css file fine. I know that the folders and filenames are spelled correctly... when I type the link in my template into the address bar it goes directly to the css file. I just can’t figure out what I am doing wrong here.
      • 8489
      • 90 Posts
      try to set bot map and url to smallcaps
        • 23330
        • 3 Posts
        hmm. i haven’t a clue what that means. smiley
          • 8489
          • 90 Posts
          try to set

          <link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/simplicityx/default.css" type="text/css" media="screen" />

          and rename the folder holding the default.css to simplicityx
            • 23330
            • 3 Posts
            aha! I knew it had to be something simple. I’d changed the code but hadn’t changed the folder names to small cases. it looks like it’s working now!