We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • SubEthaEdit is really fancy, not only do the major ftp clients use it for a default editor (I use Cyberduck) but it also has multiple editor collaboration over either local networks or the Internet, using "Bonjour". Different color highlighing for what the other editors are doing, in real-time. But it’s not free any more. So I started using Smultron, which pretty much does the same thing without the collaboration. I still prefer SubEthaEdit’s layout, though.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
    • I’ve used SubEthaEdit’s collaboration feature at a conference and it’s incredibly cool.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 20765
        • 90 Posts
        myfriendscallmebill Reply #13, 17 years, 1 month ago
        Quote from: WijbaL at Dec 24, 2006, 11:07 PM

        Is it posible to use template files instead of making templates in resources-templates?

        Name your template file "myTemplate.html"

        Place it in "/assets/templates/myTemplate.html"

        Create a template variable named "templateTV"
        Make it’s input type = "file"
        make it’s default value = "@FILE assets/templates/myTemplate.html"

        Create a document template named "myTemplate"
        Go back to the template variable and make it available to this template.
        Then return to this template and set its contents to "[*templateTV*]"

        Create a MODx document.
        Set its template to "myTemplate".

        Now you can edit your template file in Dreamweaver, etc. then upload it to /assets/templates/myTemplate.html, and when you refresh your MODx document you’ll see your changes.

        Is that what you wanted?
          • 14727
          • 11 Posts
          which of the 2 methods is faster?

          are there any drawbacks??
          • Quote from: myfriendscallmebill at Mar 29, 2007, 05:22 AM

            Quote from: WijbaL at Dec 24, 2006, 11:07 PM

            Is it posible to use template files instead of making templates in resources-templates?

            Name your template file "myTemplate.html"

            Place it in "/assets/templates/myTemplate.html"

            Create a template variable named "templateTV"
            Make it’s input type = "file"
            make it’s default value = "@FILE assets/templates/myTemplate.html"

            Create a document template named "myTemplate"
            Go back to the template variable and make it available to this template.
            Then return to this template and set its contents to "[*templateTV*]"

            Create a MODx document.
            Set its template to "myTemplate".

            Now you can edit your template file in Dreamweaver, etc. then upload it to /assets/templates/myTemplate.html, and when you refresh your MODx document you’ll see your changes.

            Is that what you wanted?

            GREAT!
            I use EditPlus - > FTP - >Open Remote

            NEW: i thing documents using this template must be NOT Cacheable!
              palma non sine pulvere
              • 10189
              • 109 Posts
              This is a great way of easily working with several templates at once! However, something worries me a bit. I name my template files start-page.tpl, for example, and put them inside a folder named "t" in the root. I noticed that you can enter the URL of the file and see the whole content of the template unparsed (even if I were to use .html instead of .tpl, the snippet tags would be fully visible). This may be revealing a little more than I am comfortable with. Is there any way of preventing this?
                • 25483
                • 741 Posts
                Quote from: frippz at Oct 14, 2008, 08:48 AM

                This is a great way of easily working with several templates at once! However, something worries me a bit. I name my template files start-page.tpl, for example, and put them inside a folder named "t" in the root. I noticed that you can enter the URL of the file and see the whole content of the template unparsed (even if I were to use .html instead of .tpl, the snippet tags would be fully visible). This may be revealing a little more than I am comfortable with. Is there any way of preventing this?

                Just place it outside the root of your website.

                for example in directadmin you have your site here:
                /home/domain/domain.ext/public_html/

                Then you should place your files in
                /home/domain/domain.ext/templates/

                The files are then available to MODx, but they are not browsable by anyone.
                  with regards,

                  Ronald Lokers
                  'Front-end developer' @ h2o Media

                  • 10189
                  • 109 Posts
                  Quote from: MediaGuy at Oct 14, 2008, 08:55 AM

                  Just place it outside the root of your website.

                  for example in directadmin you have your site here:
                  /home/domain/domain.ext/public_html/

                  Then you should place your files in
                  /home/domain/domain.ext/templates/

                  The files are then available to MODx, but they are not browsable by anyone.
                  Great tip! Thanks! smiley However, this will only work with the better hosts that lets you put stuff outside the web root. I’ve got some clients that uses hosts that only allows access directly to the web root and not outside it. I’d appreciate any other suggestions regarding those cases.
                    • 25483
                    • 741 Posts
                    Maybe you could use a .htaccess to block browser access to the folder? Or a good chmodd?
                      with regards,

                      Ronald Lokers
                      'Front-end developer' @ h2o Media

                      • 15667
                      • 11 Posts
                      Quote from: jorgerpo at Oct 10, 2008, 08:01 PM

                      which of the 2 methods is faster?

                      are there any drawbacks??

                      I tried both methods. I like the snippet approach if only to avoid having a TV variable show up in the document editing form. I also find it easier to use [!includeFile!] when I am making changes so I don’t have to invoke the Clear Cache function after every edit.