We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14061
    • 4 Posts
    I have a website and i don’t know how to manually install it as a module in MODx.

    I copied my website to assets/modules/mysite

    And how can i do in continually to deploy my website as a module in MODx ?

    May you show me how to do that, please ?

    Thanks for your helps


    Duong Quoc Thang
      • 28033
      • 925 Posts
      Huh? MODx isn’t really like a Joomla!-type site where you have a module like that. It’s more for having your content that’s already done being wrapped around the CMS (instead of the cookie-cuttter approach the other way around).
        My Snippets
        -> PopUpChunk v1.0
        • 14061
        • 4 Posts
        Quote from: Soshite at Dec 30, 2007, 07:33 AM

        Huh? MODx isn’t really like a Joomla!-type site where you have a module like that. It’s more for having your content that’s already done being wrapped around the CMS (instead of the cookie-cuttter approach the other way around).

        Ah, first of all, I am moved and fired by your help.

        Secondly, thanks to your saying, i have two things which is needed to your explanation:

        1) How can we create a module manually to install into MODx, just like "quick edit" or "doc manager" modules ?

        2) Can you explain more about the cookie-cutter approach and the advantage of the approach of MODx ? How can i change my code in my site to use the advantages of MODx ? I’m eager for new detail said from you.

        As you know, i’m a newbie in web programming and using CMS systems. I often program applications in Java and C#. So in the process of web programming, i have many questions. So with your explanation, i can open my mind in this field.

        Best regards,

        Duong Quoc Thang
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          There is a tutorial (three articles) on creating a Manager module on my site http://sottwell.com/database-module.html You can also log in to the Manager on that site (username = guest, password = guestuser) and look at how the Manager works.

          The "cookie-cutter" approach is where the page will have a very specific layout which cannot be changed, and various blocks of content are automatically placed where you want them to go within that layout. So all sites using that CMS will have the same layout; the designer has very little choice.

          MODx does not in any way restrict your page layout ( http://loripsum.co.uk/ for example ). This gives the advantage of having your site the way you want it, and the disadvantage of not having drag-and-drop simplicity in adding blocks of content.
            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
            • 14061
            • 4 Posts
            First of all, i greatly appreciate to Sottwell’s help.

            I’m still discovering all functions of MODx. Thanks to Sottwell, now i know the difference between Joomla and MODx. Tomorrow, I will read your tutorial as soon as possible because i must go to bed now, it’s too late for starting a new week (3:30 AM).

            After using MODx and try to create chunks & snippets, modules. Now maybe i know the main role of each kinds. For example, chunk is used to display content in HTML by using the mix of snippets & HTML code. Snippet is the pure of source code in PHP to process our business logic. Both of them often services for client side (end users side) & server side (admins side).

            In the other hand, which is called modules is only used for server side (admins side).

            Am i right about the function of modules, chunks and snippets ?

            I still have many question about using MODx and will post my questions tomorrow.

            One more time, thanks for your help, Mr Scottwell.

            Best regards,

            Duong Quoc Thang
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You are getting the idea.

              Chunks are for re-usable chunks of HTML, including MODx tags, to use in your templates and content areas. A good example of a chunk would be for a common footer (with copyright and other information) that you want to use in every page, even if they use different templates. It is also convenient to use if you have complex snippet calls, or blocks of HTML for sideblocks so your template’s HTML code itself will be kept simple. I prefer to have only the main layout HTML containers in my template, then all inner blocks and containers are chunks or TVs.

              Snippets are for adding PHP code to a page. (I use "page" for what will be displayed on the web site, and "document" for what gets edited in the Manager, usually the main content part of a page) Normally, you would add <?php ... ?> tags in a web page HTML to add dynamic functions; the MODx snippet (and TV) tags act as wrappers to allow the php code to take advantage of the various MODx API functions.

              TVs (Template Variables) are a very powerful way of creating blocks of content, code, or whatever you can imagine on a page-by-page basis. When you begin to understand how to use TVs, you will really begin to understand the unique flexibility and power of MODx.

              Modules are for adding a function to the Manager, such as newsletter management functions. An interesting variation on this idea is the MaxiGallery snippet. Instead of having a Manager module for managing the galleries, it uses snippets so that the gallery is managed from web pages in the front-end rather than a module in the Manager. This way both manager users and web users can be allowed to manage galleries. Likewise, there are snippets to allow web users to edit and create documents from the front-end.

              Plugins are for interrupting the document parsing process to add or change something. These interruptions are called "events", and can also be for interrupting management functions, such as doing something extra when creating a new user. With plugins you don’t have to "hack" the core code, so there’s no problems with upgrading MODx (or breaking your MODx installation!).

              A good example of a plugin is the QuickEdit plugin, which interrupts the parsing of a document to add the QuickEdit buttons and javascript to the final page if the user is logged in as a manager user with permission to edit that document.

              Some snippets use the same "events" plugin idea for enabling new features to the snippet without having to hack the PHP code of the snippet. The eForm snippet does this, allowing you to add functions like database access at different stages of the display or of the processing of the form.

              And that’s MODx... MODular and eXtensible!
                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
                • 28033
                • 925 Posts
                I forget the URL ATM (busy --- can’t look it up right now), but look on the Wiki for a "TV as chunks" or something along those lines.

                It allows you to create a radio list (for example), where let’s say it has all of the different types of navigation on your site. If Page X needs X navigation, you just click that, and it’ll add it, etc. etc.

                I use it on my website --- it’s a VERY useful little snippet. wink
                  My Snippets
                  -> PopUpChunk v1.0