We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28673
    • 178 Posts
    Hi! I’ve got to build a site that needs dynamic content only for 2 kind of pages: news and a subcategory of the company products.
    I’d like to use modx only for that pages, while keeping the rest of the site made with plain regular html pages.
    Is it possible? If yes, how can I do it?

    Thank you
      • 3749
      • 24,544 Posts
      I don’t think that’s possible, but I think you’d be better off just having all the pages in MODX and designating those non-dynamic pages as cached.
        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
        • 28673
        • 178 Posts
        ok thank you. I want your book! wink tongue
        • You can definitely do that using the Friendly URLs feature. MODX will only serve pages virtually via an FURL if a physical file or directory does not exist on the server at that location. So only build those pages in MODX and have static HTML files wherever you want.
            • 28673
            • 178 Posts
            @OpenGeek: thank you, interesting. But I can’t fully undestand what you’re saying since I never used FURLs before. The .html should anyway be visible in modx as some kind of resource (maybe as static resources or weblinks)? In what way should I implement FURLS then? (yes, I already read http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs but didn’t understand too much) tongue

            Thank you
              • 24068
              • 4 Posts
              Quote from: stratboy at Jun 15, 2011, 03:25 PM

              @OpenGeek: thank you, interesting. But I can’t fully undestand what you’re saying since I never used FURLs before. The .html should anyway be visible in modx as some kind of resource (maybe as static resources or weblinks)? In what way should I implement FURLS then? (yes, I already read http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs but didn’t understand too much) tongue

              Thank you

              Let me try to explain that:

              With FURLs you turn urls from say hxxp://www.mydomain.com/?id=23 to hxxp://www.mydomain.com/about.html. Basicly this is done by sending the about.html-part to modx and modx figures out its id, say 23, and sends resource 23 to the browser. It important to know that there is no file under about.html. Its all done with the index.php of modx and some .htaccess magic.

              Now image you create that file named about.html. Then that file is used and no modx will be called. The server just sends the static html-file you just created.

              You can use that behavior to easily accomplish what you described in your opening post. Just create your website with static files. Then modx handles only the calls to - say - hxxp://www.mydomain.com/news.html and all calls below hxxp://www.mydomain.com/products/. You just have to make shure that there is no news.html and that there is no products-directory.
                • 24068
                • 4 Posts
                And just because it fits somehow in this topic: What you want to do is how i’m used to build websites: Static files for static content and php for the dynamic parts. I don’t want to call up a php proccess for content that is just not dynamic. Even if there is a very good cache-system and even if MODx is very fast, i just don’t want to waste resources in terms of energy and page-load speed. It was the main reason for me to write the Statiker extra (http://modx.com/extras/package/statiker). With Statiker i can build my websites from within MODx plus i get resource-saving static files.

                EDIT: Static files are at least 2 times faster than any fully cached classic MODx-page. Most of the time the factor is higher.
                  • 3749
                  • 24,544 Posts
                  Quote from: OpenGeek at Jun 15, 2011, 02:39 PM

                  You can definitely do that using the Friendly URLs feature. MODX will only serve pages virtually via an FURL if a physical file or directory does not exist on the server at that location. So only build those pages in MODX and have static HTML files wherever you want.

                  I can’t believe I didn’t know that. tongue
                    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
                    • 28673
                    • 178 Posts
                    @pureppl: THANK YOU, really good explanation and also glad to know it’s not a so strange thing the one I want to do.
                    Thank you very much.

                    @BobRay: just add it to your book then. wink
                      • 33968
                      • 863 Posts
                      It’s also no different to using static .css and .js files on the same server, which most of us seem to do anyway smiley

                      @pureppl - that was a nice, simple explanation about FURLs, thanks!