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

    Just starting on with modx, just wondering, I have set up a custom template, I have my images and css in the templates folder, everthing is working great. The one big restriction for me is that I have to login to the admin console to edit the template, is there a way of doing it via ftp?

    Thanks
    Lee
      http://www.blend.uk.com | Web Design by Blend
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you use one of the snippets that includes a given file in your Manager template field, then you can edit the file as you please.

      http://modxcms.com/forums/index.php/topic,3061.msg34299.html#msg34299
        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
        • 17717
        • 433 Posts
        Hi Susan,

        Could you further explain. Sorry, total modx newbie here.

        Thanks
        Lee
          http://www.blend.uk.com | Web Design by Blend
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Make a new snippet, with the code from the post I linked to. Now in your template, just put the snippet tags, [[SnippetName?file=`assets/templates/MyTemplate/mytemplate.php`]]. With your FTP client, go to assets/templates and create the folder MyTemplate, and put mytemplate.php there. (of course the names can be whatever you like)
            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
            • 17717
            • 433 Posts
            Excellent. Thanks for your patience, for some reason, I quickly glanced over your reply and didn’t see a link through, my fault.

            Thanks again.

            Lee
              http://www.blend.uk.com | Web Design by Blend
              • 17717
              • 433 Posts
              Would the snippet go in the head or the body of the template and would I delete all the existing content currently storred in the template I modify via the modx admin area.

              My understanding of what is happening with this snippet is that the template which I think is stored in the database is calling the template which is stored on my ftp server, therefore, I delete everthing except the snippet in my admin template.

              Is this right?

              Just trying to get my head round this, once I do I will be flying.... honest.

              Lee
                http://www.blend.uk.com | Web Design by Blend
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Exactly! Nothing in your Manager template except the snippet. Your template file itself does not have the snippet, it’s just your template. Consider the snippet as just a wrapper for the include().
                  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
                  • 17717
                  • 433 Posts
                  Thanks for bearing with me on that. Got it implemented, I can edit till my hearts content now.

                  Thanks
                  Lee
                    http://www.blend.uk.com | Web Design by Blend