We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44608
    • 12 Posts
    Hi I'm following the above tutorial working under my localhost path.
    index.htm works fine in FireFox with all its folders (css,js,images).
    Then I pasted index.htm into Elements > Template, I refreshed the front-end, but all metadata is missing. Why ? The folder structure is just fine when I run index.htm outside MODx.

    Firebug tells me that MODx is looking for CSS,JS, Images in the following folders (which do NOT exist):
    http://localhost/modx228/js/  
    http://localhost/modx228/css/  
    http://localhost/modx228/images/  


    I want MODx to search those files in the following path (which exist) :
    http://localhost/modx228/assets/templates/soho/js
    http://localhost/modx228/assets/templates/soho/css
    http://localhost/modx228/assets/templates/soho/images


    How to do that ? Why MODx is not looking for those folders as indicated in the html ?
    many thanks

    [ed. note: alex32 last edited this post 13 years, 2 months ago.]
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      What exactly is in your template head section? Can you paste that here?

      And, in your example you're using mixed up slashes, some are forward slashes, some are back slashes. Use forward slashes for web paths. Back slashes are for your system paths.

        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 44608
        • 12 Posts
        Hi

        the template is 'soho' from MODx offial tutorial :
        http://rtfm.modx.com/display/revolution20/Integrating+a+Template+into+MODX+Tutorial


        <head>
                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
                <title>SOHO - Elegant HTML Business Template</title>
                <script type="text/javascript" src="js/jquery.js"></script>
                <script type="text/javascript" src="js/cufon.js">
                </script>		
                <script src="js/TeXGyreAdventor_400.font.js" type="text/javascript"></script>
                <script type="text/javascript">
                    Cufon.replace('h1,h2,h3,h4');
                    Cufon.replace('#menu #nav li');
                </script>
                <script type="text/javascript" src="js/slides.min.jquery.js"></script>
                <script type="text/javascript">
                    $(function(){
                        $('#slider').slides({
                            preload: true,
                            preloadImage: 'img/loading.gif',
                            play: 5000,
                            pause: 2500,
                            auto: 2000,
                            hoverPause: true,
                            animationComplete: function(current){
                                $('.caption').animate({
                                    bottom:0
                                },200);
                            },
                            slidesLoaded: function() {
                                $('.caption').animate({
                                    bottom:0
                                },200);
                            }
                        });
                    });
                </script>
                <link rel="stylesheet" href="css/global.css" />
                <link rel="stylesheet" href="css/reset.css" />
                <link rel="stylesheet" href="css/960.css" />
                <link rel="stylesheet" href="css/style.css" />
            </head>
        
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          Oh, the path isn't correct. You have to tell it where you placed the files, as is it's looking for them in the root. Just add the paths like this:
          <script type="text/javascript" src="assets/templates/js/jquery.js"></script>
                  <script type="text/javascript" src="assets/templates/js/cufon.js">
                  </script>    
                  <script src="assets/templates/js/TeXGyreAdventor_400.font.js" type="text/javascript"></script>
                  <script type="text/javascript">
                      Cufon.replace('h1,h2,h3,h4');
                      Cufon.replace('#menu #nav li');
                  </script>
                  <script type="text/javascript" src="assets/templates/js/slides.min.jquery.js"></script>
                  
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 44608
            • 12 Posts
            you're right! it worked

            many thanks
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              You're welcome. Have fun!
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster