We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15001
    • 697 Posts
    The only advantage I am seeing is that the chunks could be in the file system as well, using
    the @File construct...
    Depending on the size of your chunks this can be very profitable to have them stored in the file system.
    Typing code in a good editor is generally more comfortable than typing code in the backend.
    You also don’t have to export the database and later import it when editing layouts locally. You just "drag" the files with FTP when they’re ready.
      • 34017
      • 898 Posts
      you can use the [[includeFile snippet in chunks too. or directly in the template.
        Chuck the Trukk
        ProWebscape.com :: Nashville-WebDesign.com
        - - - - - - - -
        What are TV's? Here's some info below.
        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
        • 4971
        • 964 Posts
        Good reasons, I use the FF addon "its all text" which brings all my code to Notepad++ in one click... very convenient...

        I think that we need to move both the DB and the files every time we move a site...

        Chuck: that is a good idea too... include the chunks in the manager or include them in the template.... mmm...
        will try some of this sometime...
          Website: www.mercologia.com
          MODX Revo Tutorials:  www.modxperience.com

          MODX Professional Partner
          • 3749
          • 24,544 Posts
          Quote from: charliez at Feb 04, 2009, 05:26 PM

          I think that we need to move both the DB and the files every time we move a site...

          Yes, absolutely. But if your element contents are in files, you don’t need to move the DB to *update* the site -- just those files.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 10957
            • 32 Posts
            Would it be possible to call this plugin from a chunk (to load the chunk from a file) ?
              • 25663 MODX Staff
              • 12,272 Posts
              That’s what the include snippet can do. Plugins are not callable from chunks.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 15001
                • 697 Posts
                Would it be possible to call this plugin from a chunk (to load the chunk from a file) ?
                That’s what the include snippet can do. Plugins are not callable from chunks.

                Now possible !
                I changed the plugin’s code so that it can be called from a chunk. See:
                http://modxcms.com/forums/index.php/topic,37897.0/topicseen.html

                In my case the plugin was named LoadTemplate (by analogy to the LoadDocument snippet) but if I remember it’s the same as the templateFromFile plugin. Original plugin author is heliotrope if my mind is correct.
                  • 1561
                  • 22 Posts
                  Quote from: heliotrope at Jan 28, 2009, 07:19 AM

                  @dev_cw

                  Here is a recursive version smiley
                  Let me know if it works.


                  I’ve used code on an EVO 1.0.2 release and so far, all is working with templates and chunk. Thanks much, this could be extremely useful for fast development.
                    An aspiring web designer & front-end web developer who is very much interested on the modern web.

                    www.andrewabogado.com