We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21946
    • 283 Posts
    Hello

    I’m a drupal (dev) user since two years. I love Modx evolution and even more modx revolution and would like to use it for professional websites. But i’m now very frustrated but the fact that all code is stocked in DATABASE (chunks, snippets, templates). I hope someone who use modx intensively may bring answers to those questions :

    - I’m working with an IDE (eclipse), and even if modx revolution manager UI is great, an IDE is far more easy to colorize and edit code, and DEBUG. Edit or read php in a textarea is an unpleasant experience. I guess i can use an include snippet. But this is not a solution, this is a workaround.

    - deployment, staging : to push changes from localhost to production site, all is in database so you have to drop database production to put the one from your localhost. That just mean staging is painful because i loose my production site content by doing things this way sad

    - no way to works together (with your team) on the same template, snippets, chunks etc... How to use svn or git since when i build a site, i save chunks , templates etc... in database ?
      [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
      • 28948
      • 42 Posts
        --
        cal wilson
        oksushi.com
        • 21946
        • 283 Posts
        thanks for responding. yeah, that’s the include snippet i was talking about.
        So, i guess this is the only way. That means that all my chunks, templates and snippets will contain only ONE line which will be the path to the file.
        Don’t know why but that sounds weird.

        Is this how professionnal websites are built with modx ?
          [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
          • 21946
          • 283 Posts
          I read this sentence from the page you just gave me :

          "MODx, however, stores its data in the database. This has many benefits generally,"

          what benefits ? That’s the point, i can’t see the benefits of putting html and php in database. But i would like to hear from modx ninjas the benefits of that approach.
            [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
            • 33976 ☆ A M B ☆
            • 571 Posts
            Hey Yann,

            you could be interested in that thread http://modxcms.com/forums/index.php/topic,54074.0.html.
            By the way, for chunks you could always use the bindings @FILE… (http://rtfm.modx.com/display/revolution20/Bindings).

            Hope this might helps you.
              • 21946
              • 283 Posts
              thanks a lot, that’s exactly what i was looking for smiley
                [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
                • 21946
                • 283 Posts
                yes, using @file for TV for example is another way to store configuration in files. An include snippet seems to be the way to put templates, chunks and snippets in files rather than in database.

                I know that there is also way to put default chunks of a snippet in real files but don’t know how to to this.
                  [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
                  • 1169
                  • 312 Posts
                  I see no reason why you cannot use Git instead of SVN with above Solution.

                  The biggest coding task I find is converting the HTML/CSS to the MODx Template and chunks.(mainly copy and paste)

                  I am intending to give this a try one day but my needs are so small I do not think it will be worth the trouble the only time I use an Editor with code highlighting I use FF "It’s all Text" but mine are not professional sites with multiple writers.

                  At present I am using Revolution but have done small sites in Evo all work is done on localhost first then uploaded to hosting.

                  Works for me and I feel a lot more MODx users.
                    DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
                    • 21946
                    • 283 Posts
                    you mean with http://modxcms.com/extras/package/696 ?
                    I only know svn for the moment, that’s the only reason.
                    With modx Revolution, i’m looking for simplicity, and adding this mackage to put code in files (where it should be IHMO) sounds to me like adding complexity for something that should be as simple as possible (editing a template, working with a version system to work with a team and keep traks of changes).
                    And i don’t really like the idea of having datas BOTH in database and in files :-/

                    So the include snippet sounds better to me.


                    "At present I am using Revolution but have done small sites in Evo all work is done on localhost first then uploaded to hosting."

                    Even with a small site, you need to push changes from locahost to your hosting from time to time. And it’s far more easier to upload a few files than dealing with sql database. I’m just doing my blog with modxrevolution and i have this need. Changing css is easy because i use a file. But if i change a snippet, i have to replicate this change on production site. Not good.

                    I do not say modx is wrong concerning this problematic, i’m just looking for answers and feedback from modx community about how they do this.
                      [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
                      • 17499 ☆ A M B ☆
                      • 872 Posts
                      I agree with your points, and actually don’t use snippets and chunks in the database for my components.
                      And i do that since MODx 0.9.6.

                      I only keep my final templates in the db.

                      It doesn’t bother too much that the "default" behaviour is to store things in the db. I just don’t use it (or only with very small snippets/chunks).