We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30856
    • 21 Posts
    Hi All...! Going great learning CSS and MODx...

    I already have my TV linking to the main HTML page for the Template with this cool technique.
    [[includeFile? &file=`assets/homepage.htm`]] is the ONLY line in my Template. Glad I found that one out!

    Can I do this for ALL documents...?


    For a SMALL site what are the ramifications and gottchas IF I were to use:

    [[includeFile? &file=`assets/MODx_document.htm`]]

    for EVERY document page .... huh?

    I’ve tested the <[[includeFile? &file=`assets/test.htm`]]> as the ONLY line in a document and it works...
    [my test was only calling a page that was already linked to my CSS menu via wayfinder 2 ..

    hmmm......

    I figure there’s gotta be some drawbacks... though I’m NOT the least bit concerned about speed.
    I’m learning so I figured it would be cool to have every page available to play loose. So I change a document’s linked style sheet or the HTML and save and voila... it updates.... without having to paste into the MODx backend...

    love the Quickedit of course... though I’m hoping to speed things up while I learn.

    Maybe I’ve missed something obvious.... I’ll have to think... though I don’t think that because my template is using
    [[includeFile? &file=`assets/homepage.htm`]] that every other document page is already linked... I’d have to do the ?includeFile WITHIN every document right huh [if I wanted this ’document not in the database’ vibe.

    yep... more thought needed here, though I did wanna ask for any comments as this one’s a big one for me.


    best wishes....

      • 27376
      • 576 Posts
      What’s the point of using MODx if you’re just going to include all the pages on your filesystem huh

      You wouldn’t be able to use QuickEdit at all with this technique as all it will allow you to edit is the snippet call.

      Including your template is fine and is what a lot of people are doing who use external version control on their templates, but including all your documents is NOT something I would recommend.
        • 30856
        • 21 Posts
        yes.... I’m stumbling towards the same conclusion.

        yet.. Could I for ’beginner’ purposes STILL include all calls to ;js and TVs and chunks .. IF I were to try working this way??
        Wondering if there’s ANY limitations...
          • 27376
          • 576 Posts
          Theoretically and for the most part, realistically: no.

          You could run into trouble however if you nest [[includeFile]] snippets greater than 10 levels deep. This ceiling is to keep the MODx parser from slowing down too much. Other than that, since you say speed isn’t an issue, I don’t see any problem with it.

          Enjoy! smiley
            • 30856
            • 21 Posts
            thanks sirlancelot .....!

            yeah, I’m figuring out CSS and other basic things so it MAY a good way for me to stay in my editor and just refresh the browser UNTIL I reach a decent understanding...

            And ... like many others my eyes a BULGING wide at how MOD MODx is.. [i go to sleep thinking about stuff and how MODx has started my interest up for so many things... for me CSS is what I’m studying as well as javascript.. and how I can implement all the MODx feature I might need...
            WAY enjoyable....

            again, many thanks....