We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8499
    • 19 Posts
    Hi there,

    I’m new here and mostly new to ModX, so pardon my lack of experience with this! I tried to look for answers for this within the forum but could not get one.

    I’m having a problem for some resources to show the css. The resources with the problem are within a folder which is within a folder,
    the rest of the resources are ok.

    This is the site (the one I’m temporarily developing)
    http://www.barristermagazine.com/zstaging/

    You can see there that it is loading the css fine, but once you click in one of the article below, (loaded with getResources but I don’t think that may be the issue) the articles don’t load the css.

    i.e.:
    http://www.barristermagazine.com/zstaging/article-listing/sample-of-article/apple-tart-is-good-too,-i-like-it-with-cream,-it-tastes-like-heaven!-i-love-cakes!.html

    Those articles use a different tempalte, but the call to the css files is the same:
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <link href="menu_style.css" rel="stylesheet" type="text/css" />
    <link href="banners_style.css" rel="stylesheet" type="text/css" />


    Now, you can see that those articles are within 2 levels from the root, but even adding the good old "../../" to the path of the css files would not help at all.

    Anyway, I would be very thankful for any insight on this!

    Cool beans and thanks to ye for reading this.

    Edu.
      • 22427
      • 793 Posts
      If you use Firefox and its Addon [tt]Web Developer[/tt] , you can have a look in your styles via [tt]CSS > View CSS[/tt] . Then you’ll see that the CSS files used by your article page have the path (f.i.)
      http://www.barristermagazine.com/zstaging/article-listing/sample-of-article/styles.css
      So your idea using the preceding [tt]../../[/tt] could help - if there were really CSS code at that location. But [tt]Web Developer[/tt] shows there the HTML code of the page!
      I don’t have an explanation for that - but it shows that something is fundamentally wrong with your site.
        • 7327
        • 195 Posts
        I think an absolute link (http://www.site.com/path/to/your/css/file.css) can clear this up. Assuming you’ve put in style.css in your http://www.barristermagazine.com/zstaging/ directory, why don’t you see if putting this in place of style.css works:

        http://www.barristermagazine.com/zstaging/style.css
          • 28948
          • 42 Posts
          Quote from: edumira at Nov 14, 2010, 04:20 PM

          Those articles use a different tempalte, but the call to the css files is the same:
          <link href="styles.css" rel="stylesheet" type="text/css" />
          <link href="menu_style.css" rel="stylesheet" type="text/css" />
          <link href="banners_style.css" rel="stylesheet" type="text/css" />


          What you probably want is:

          <link href="[[++site_url]]styles.css" rel="stylesheet" type="text/css" /> (for Revo)
          <link href="[(site_url)]styles.css" rel="stylesheet" type="text/css" /> (for Evo)

          Also, make sure you have your <base href="[[++site_url]]"> in the <head> of your template (or <base href="[(site_url)]"> for Evo
            --
            cal wilson
            oksushi.com
            • 8499
            • 19 Posts
            Thanks everyone! Sushi you are a star. That did the trick! I supose the full URL would work too, but I rather avoid that...

            Now works, thanks again! laugh