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

    Didnt see an introduction area so I figured I would drop in and introduce myself. My name is Greg. 30 years old, married with 2 kids. Living in South Carolina.

    I have been developing sites for many years now. I am a developer by trade (mostly oracle) and moonlight with websites for a little extra doe.

    I have installed modx and began to take a look around. The confusion has now started smiley

    I have created and maintained a custom CMS that I have built for many years. I am used to doing things a bit differently. I generally create a graphical layout, cut it up, do the css and place those in the themes folder. Then I go through and cut on the modules that a customer may need. Some of these may be custom and designed specifically for the customer which includes custom database design, front end pages (documents) and then administration pages for them to manage the data/relationship/structure/layout of the module.

    Couple of questions.

    So, what would these modules be in Modx? Snippets? I understand that chunks cannot contain php etc.

    Also, I am assuming that I would just layout the graphics in dreamweaver with the appropriate html/div etc and then copy paste into modx as a template? Then create documents based on that template adding in chunks/snippets etc where I see fit?

    I can not find where a "user" or in my case an administrator would log into control the content or information displayed in a document. I am hoping the admin panel that I am seeing is for the site developer or site administrator. Is this the case?

    I have been looking through the documentation that I can find, the developer guide that I think I have and other forum posts/topics to see if I can get a hold on the overall flow of this thing. Any front to back tutorials or step by steps would be greatly appreciated.

    The first thing I want to do is to run through a simple site with static content, then start adding in dynamic "modules". Then I think I would be good to go (for about 15 minutes anyways smiley

    Thanks for the info in advance and I look forward to working with ModX.

    Greg
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Most dynamic content in MODx is supplied by snippets. These roughly correspond to <?php ... ?> tags. Chunks are text or HTML code, but can include snippets. Template Variables can also be used to process PHP code (@EVAL <php code here> ) Snippets are processed in the parser through the eval() function in 0.9.6 (Evolution). The redesign Revolution (still in alpha) uses a different mechanism.

      Yes. Templates are very simple. Copy/paste the whole page’s HTML code, then replace content with the appropriate MODx tags (menus with a Wayfinder snippet call, main content with [*content*] tags, footer content with a chunk such as {{footerContent}} if desired, etc) See http://sottwell.com/how-templates-work.html for more detail.

      To manage the site log in to mysite.com/manager. Everything is controlled from there, except for the Quickedit front-end page editing feature (you have to be logged in to the Manager to get the Quickedit feature on the page).

      I’ve got a few articles up on the inner workings of the CMS on my site, as well as a guest user login with view-only permissions to most of the Manager functionality.

      You can install a full-featured demo site by selecting the first check box when installing (or run the installer in Upgrade mode, then check the box on an existing installation).



        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
        • 3749
        • 24,544 Posts
        Welcome to MODx. smiley

        It sounds like you have a fairly good handle on things already. A MODx template has a lot in common with a Dreamweaver template. What would be "editable areas" in DW, are fields on the document screen (possibly including Template Variables) and chunks, with snippets doing the PHP for you.

        End users (i.e. clients) can see a stripped down version of the MODx Manager or, with a little work, can do their editing in the front end using various add-ons.

        See the site in my sig if you haven’t already for more of an introduction to how MODx works and feel free to ask any questions you have.

        This part of the MODx Wiki is also very useful for newcomers: http://wiki.modxcms.com/index.php/Category:Beginners. It has some excellent tutorials as well.
          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
          • 11169
          • 5 Posts
          after looking at some of the tutorials, docs, etc I am getting a bit concerned that this may not be a good fit for me. I am used to handwriting php, html etc and uploading files that the site uses.

          It appears that most anything that I do in DW will have to be copied and pasted into the modx structure. Is this the case?

          Also I am worried about the manageability of the site by an end user. This has been my selling point in the past. Currently clients have an easy to use administration panel with tinymce for all "text" editing and then modules are custom forms.

          An example would be ecommerce. I have a shopping cart that I have built where the admins can log in, view orders, print packing slips, check on payments, change order status etc. Is this going to be easily done by the end users/administrators in modx? It doesnt have to be ecommerce necessarily, I am just worried about the end user getting scared/frustrated with the modx admin panel as it seems a GOOD bit more technical than my average user will be able to understand.

          Am I just getting jumpy without having jumped all the way in? Will this all come to me or is this just how modx is? Is modx a CMS for the developer or a CMS for the user?

          Greg
            • 25663 MODX Staff
            • 12,272 Posts
            ManagerManager and user roles are your friends. You can make a fully bespoke admin system that’s very simple, while still maintaining full access to all the good bits for developers that need more power.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 29774
              • 386 Posts
              Hi Greg

              You can set up a Manager role with limited privileges (eg ’content author’) and assign it to those Manager users that you want to just edit content within the site tree. You can decide how much of the Manager your users see by carefully defining the role; and you can go further than this by creating document groups and assigning them to user groups, thereby allowing your users to edit only certain documents within the site tree (eg news).

              As for pasting into Manager fields, what many people do when creating a snippet is simply include an external file, eg:
              <?php
              return include($modx->config['base_path'] . 'assets/snippets/mysnippet.inc.php');
              ?>
              


              You can do the same thing with plugins, and you can use a snippet, plugin or TV (with the @FILE binding) to include an external file inside a template, so you can edit the template in your text editor of choice. I use Textmate for most of my coding.

              When it comes to managing a custom data model, you will find that much of the time TVs will provide you with a quick way to create management forms as modx documents. For example, TVs can be used to model a ’product’, ’categories’ , ’options’ and establish relationships between them. The ManagerManager plugin allows you to organise your TVs into tabs, rename fields and many more things that you will find useful in making the Manager interface user friendly.

              Relying on TVs is not always appropriate however, and for managing custom db tables you can write a module accessible within the Manager, or create CRUD functionality for logged in webusers on the front end using snippets. The later approach is what I tend to do, because I can create the admin interface exactly as I wish using all the wonderful templating ability built in to modx.




                Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                • 28309
                • 12 Posts
                Welcome to modx.

                1. Modx can be used as per your requirement.
                a> It act as framework for the developer.
                a.1> you create reusable,pluggable component in form of snippets.
                b> it act as cms for end user perspective.

                2. my answer to your confusion regarding the snippet that you need to paste every thing in their only.
                a> No you never required to paste all the code in the snippet.
                b> You can use DW or PDT for developing with modx. my personal preference is the PDT. you can down load from zend’s site. http://zend.com free of cost. It will enable you to debug and navigate to classes and function , inline tips and many more easily compared to DW.
                Oh yes, you can do your css or html page design on DW.

                c> the steps to create new snippet will be
                c1> create a dir "mynewsnippet" under "assets/snippets/"

                c2> create a php file "mynewsnippet.php" under "assets/snippets/mynewsnippet/"

                c3> add some php code inside mynewsnippet.php file i.e
                <?php echo "hello world"; ?>


                c4> now open modx manager in the browser . go to resources->manage resources->snippets

                c5> click on new snippet. enter the snippet name "mynewsnippet"

                c6> in the " Snippet code (php)" section add following line
                                  <?php include_once($modx->config['base_path'] . "assets/snippets/mynewsnippet/mynewsnippet.php");?>  
                              

                and save the snippet.

                c7> now create a new document and call this snippet by putting this non cacheble call [!mynewsnippet!] in content area and save the document.

                Now preview the document by right clicking on the document and selecting the preview option. you will be able to see the hello world page.

                if you want to change the hello world output then you just change the code in "assets/snippets/mynewsnippet/mynewsnippet.php" . and it is more better and convinient as it t can be done by your DW or any notepad.

                3. regarding the admin side area for your clients.
                a> you can enable friendly url and create a document folder called admin and keep all the document their specific to admin part. you can create a user group and and set the access permission to them.
                b> you can use modules in modx managers for your task as well for super administrator.
                  • 11169
                  • 5 Posts
                  so to me, after all of the answers.... thank you very much by the way for all the info.

                  It sounds like it can do what I am attempting to do, I just have to learn it.

                  one last question (for the next 15 mins anyways) what the heck is a TV? I have a 43 sharp smiley
                    • 3749
                    • 24,544 Posts
                    TV = Template Variable. The short answer is that it’s a way of adding custom fields to the Create/Edit Document screen in the Manager. See the site in my sig for more or consult the MODx Wiki: http://wiki.modxcms.com/index.php/Template_Variable.
                      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
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      As far as simply editing these large textarea fields (chunks, templates, snippets, etc), I use a Firefox plugin called "It’s All Text". It allows you to click on the field and automatically open your chosen editor with any existing content already pasted in, and when you save in the editor the content is automatically 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