We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28566
    • 5 Posts
    I have a big of a nag about how MODX handles the templating system. Why do I have to make my templates in the database? In other words I have to make my templates in my editor and then upload to the manager. Why can’ I simply just upload via FTP from my editor?

    Its very difficult to manage when I have to duplicate everything all the time...

    If someone can offer some advice that would be great.
      • 26931
      • 2,314 Posts
      Hi stevewbrown,

      it’s possible to use a template as a file: http://modxcms.com/forums/index.php?topic=10351.0

      j
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Another alternative is to use Firefox and the It’s All Text plug-in. Lets any textarea be edited in your favorite editor; save from the editor and it’s pasted back into the textarea.
          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
          • 28566
          • 5 Posts
          As this was the first drawback I encountered, I feel quite strongly about this. I will do the steps you mentioned, but I think that if this functionality is not out of the box then it is still a flaw. I should not have to make custom PHP templates or use firefox plugins to provide me what I consider to be standard functionality. ModX is a great system and I know its not hit the big version ’1’ yet but I still think that is has lot of areas it needs to improve on.

          My workflow should be, edit in my editor and deploy to dev/live. Duplicating content and adding other factors in the chain promotes extra margins for error and a disjointed working practice. I would be interested to hear what the dev’s think of this.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Well, it’s all about what you are accustomed to. My workflow is to log in to the Manager and open a page for Elements, then clone the tab for another manager page opened to documents. If I need to edit a css file, I’ll open another tab with a manager login and use the file manager; or just use a modx document for the css file. I rarely need to go outside the browser for anything.

            What’s the big difference:
            1. switch from browser to FTP client, navigate to file, double-click on file to download into editor, edit in editor, save to upload back to remote site, switch back to browser, refresh page to see the change.

            2. navigate to templates section, click on edit button to load in editor, edit and save to paste back into manager form, save, switch tabs and refresh page to see the change.
              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
              • 28566
              • 5 Posts
              I’m not convinced. No.2 seems particulary convoluted to me. The textedit box in the resources > templates is not an ’HTML editor’ and yet I am forced to use both that and my offline editor which makes use of colour syntaxing, indentation etc whereas the MODx texedit obviously does not. I should have the choice.

              I understand there are workarounds as pointed out in your links, but it will always seem like a bit of a hack rather than the core workings of the system.

              As I have also been curious about MODx for a while, I have also raised this with a few other developers and the general consensus is the same.

              Ah well, at least its not Joomla!
                • 22840
                • 1,572 Posts
                Quote from: sottwell at Aug 23, 2009, 04:44 AM

                Another alternative is to use Firefox and the It’s All Text plug-in. Lets any textarea be edited in your favorite editor; save from the editor and it’s pasted back into the textarea.

                Great find Susan, been looking for a way to use my editor within Modx, just the job grin

                As I have also been curious about MODx for a while, I have also raised this with a few other developers and the general consensus is the same.

                I’m a developer and have built more that 100 sites in modx and this has never been a issue for me, as Susan said it depends what you are used to.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  yet I am forced to use both that and my offline editor which makes use of colour syntaxing, indentation etc whereas the MODx texedit obviously does not
                  And your FTP client does? Or are you working from a point-and-click page building program that has FTP built-in? MODx is not, and has never pretended to be, a point-and-click site building program. If you want to edit templates from your program, as was suggested before, put a snippet including the external file in the template. Or are you offering to build a plugin for MODx that will do that automatically?
                    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
                    • 17499 ☆ A M B ☆
                    • 872 Posts
                    Quote from: stevewbrown at Aug 23, 2009, 04:56 AM

                    As this was the first drawback I encountered, I feel quite strongly about this. I will do the steps you mentioned, but I think that if this functionality is not out of the box then it is still a flaw.

                    I should not have to make custom PHP templates or use firefox plugins to provide me what I consider to be standard functionality. ModX is a great system and I know its not hit the big version ’1’ yet but I still think that is has lot of areas it needs to improve on.

                    I think that you have also to view things outside of what you think is an "out the box" features encoutered in other CMS.

                    As mentionned by Susan, MODx is not an point & click tool and for that matter, let you decide in what manner you want to work with it.

                    If you don’t want to use database for your templates, it’s up to you and it’s not a hack, it’s a decision.
                    If you want to just use an include statement for your snippets, it’s still not a hack, it’s also a decision.

                    Take a look at Jot, the commenting system for MODx, the default chunk are stored on external file.
                    It means that it’s possible but that nobody did provide yet a way to make this a default behaviour.

                    As a matter of fact, i think that it should also be an option provided by default (external file or database based) with the UI.
                    There are rooms for improvements on that subject.

                    In MODx Revolution, while the quick update is really a cool feature, it’s not really user friendly since codes is not highlighted and we lose the basic editor capability like automatic indentation for exemple.

                    If the dev team decide to not work on that, it will still not be an hack (no modification on the core), just a different way of putting things together.
                      • 28566
                      • 5 Posts
                      Quote from: sottwell at Aug 23, 2009, 05:30 AM

                      MODx is not, and has never pretended to be, a point-and-click site building program.

                      I do understand your point, but this is exactly the opposite of what I am trying to say. The issue I have raised is the dependancy of the template system in the manager, which is precisily using ’point and click’. Whereas templating in the file system (i.e upload via FTP, but not neccessarily) eradicates ’point and click’.

                      Quote from: sottwell at Aug 23, 2009, 05:30 AM
                      Or are you working from a point-and-click page building program that has FTP built-in?

                      I use Dreamweaver on my mac and Visual Developer on PC, however all code is handcoded.

                      ...

                      Don’t get me wrong, I think modX is a great CMS, precisely because it is more of a ’framework’ than compared to say Joomla (and the way that handles templates is so overcomplicated) and its great that I can set up my own way of working with templates. My problem is not that it cant be done, I know it can, I am just asking you to look at the funademntal ’philosophy’ behind the templating system in ModX - I think its important that templates work via the filesystem at the core to make this just one step futher a great CMS.Especially as its also advertised towards the ’design’ principle as well as development.