We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38058
    • 25 Posts
    Vista Home Premium
    Wamp server
    latest Revolution

    What is the best way to maneuver everything around and place things where you want them like a menu on your template. I have gone through most of the tutorials at the Coding Pad and some others maybe I have missed something somewhere. If someone could point me in the right direction I would appreciate it.

    Thanks
    Rocky
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I think you are trying to make this a lot more complicated than it is. Take any HTML template you like (there are many free template sites, or you can design your own). Simply replace the appropriate parts with the appropriate MODx tags. For example, where the menu is in the HTML template, put the Wayfinder snippet call. In the main content area, put the content resource field tag.

      I have a partially-written tutorial based on a SitePoint book here.

      http://dev.sottwell.com/index.php?id=6
        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
        • 38058
        • 25 Posts
        Thanks Susan I will start going through your tutorial today. I didn't mention that I did get a template from somewhere else but wanted to change the positions of things a little.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Well, a MODx template is just an HTML document with the changeable parts like a menu or content replaced by MODx tags.

          I have a more comprehensive tutorial for Evo which may also be useful with the only difference being that Revo tags are a bit different from Evo tags

          http://sottwell.com/how-templates-work.html
          http://rtfm.modx.com/display/revolution20/Tag+Syntax
            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
            • 38058
            • 25 Posts
            Hi Susan, I read through your articles and unless I am missing something they didn't answer my question. I have set up tags and TV's I have put in the charset I have used the wayfinder. What I am not getting is how do I sort things out on my template and put things where I want them I have used Dreamweaver and it is pretty simple with it. I know a little bit of coding and so I was able to move my menu from the left side to the middle and to the right but what if I want the menu to be right in the middle of the page, I don't wont it there I am just saying. What if I want a picture in the middle of the page do I use a TV or a chunk or is there something I need to down load.

            Thanks
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              You can still use Dreamweaver.

              The MODX template really is just what Susan said. A html document. So, you'll code in Dreamweaver and then select the portion of code that you want in the template... and then just stick it in wherever you like.

              If you use the content area of the resource (page/document), anything you stick into the content area will be pulled into the spot where you put the
              [[*content]]
              tag in your template.

              If you plunk that code into a chunk, you'll then tell your template to call it by inserting the chunk name into the template like this:
              [[$myAwesomeChunk]]


              So, let's say you've got a chunk for the header, a chunk for some specific content, some code in the content area of the page, and a chunk for the footer. In this case, your template will look something like this:

              [[$site_header]]
              [[$myAwesomeChunk]]
              [[*content]]
              [[$site_footer]]


              Or, if you want everything in the template itself, your template will contain the whole head section just like a regular html document and then you place the chunk tags into the template exactly where you want them. If you don't want to use the content tag (which pulls from the page's editable content area), just omit it and write your code into custom chunks.

              Does that help?

              EDIT: oops! Forgot to type the MODX tags properly. Doh! [ed. note: frogabog last edited this post 14 years, 9 months ago.]
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 38058
                • 25 Posts
                So what your saying if I understand you correctly is that you can't build a web site with Modx in its self you still need another editor. So say you what a form for people to fill out and send information to you do you need to use another editor or at least know the coding for the form and put in to Modx say in a chuck and then call it form the template. Aren't there modules and different things you can down load instead of using a different editor. Then in that case Modx is only used for organizing your web site. Sure I can use Dreamweaver to move things around the way I won't them but then wouldn't I just go ahead and use Dreamweaver for everything else I thought that CMS was a better way of building sites.

                Thanks for the help
                  • 10208 ☆ A M B ☆
                  • 1,780 Posts
                  MODX isn't WordPress, although it can do all that WP does and then some. You CAN build a site with MODX, but it involves some work. Once it's built however, editing is a breeze and the idea behind a content manager is to allow others (or yourself) to be able to edit a page's variable content without messing with the site layout/structure. If you allow people to be able to edit the entire html page, chances of them mucking up things like your head and menu is rather high. This way all they can edit is the content itself when you limit the user permissions.

                  Yes, you have to build the site using either new code, or just plunk in the html that you have. That's the beauty of MODX. It allows you to build your site any way that you like. Using chunks for common code that displays on every page allows you to manage your page's content without disrupting the common code. You can do this within MODX by using the "content" section from your pages/resource/document that you create in MODX. That would be the simple way to do it in some people's eyes. Personally, I prefer to edit outside of MODX because I can't stand rich text editors and what they do to destroy my code.

                  TV's are where you gain a lot of variable edit-ability. When you use TV's, your users can pick and choose things to put on various pages. That way, the content they choose goes in exactly where and how you want it coded. Again, no one can mess with the way you've designed the site to look if you restrict what they can do within the manager with user permissions.

                  There are MODX plugin's available to help you do all kinds of dynamic things with your site. They don't all (few in fact) work magically right out of the box. You still have to tell the plugin how you want it to work. But again, you are telling it exactly what you want it to do, and exactly how you want it to display. Setting them up requires a bit of work, but after that... it just does it.

                  Even if you're the only one doing editing of a site, MODX makes it so much easier. For example, if you add a new page to MODX, Wayfinder automatically adds it to your menu when it's published. If you want to change the site header image, just change it in the template or the chunk that the template uses... and all your pages that use that template are automatically changed. If you wanted to add new pages to your menu or change the header image in a static site, you'd have to edit each html file with the new menu item and image url. If you have a lot of pages, that's a real PITA. Even if you only have ten pages on your site it's a PITA in my opinion.

                  Dreamweaver is... well... I tried it and at first it's great because it's got a lot of shortcuts to do things with. But it crashes constantly with no autosave, plus you can't rely on it's visual rendering to display what the browser will actually show. I use Notepad++ rather exclusively now with the ftp plugin. Edit in Notepad++, save to the server with ftp (or localhost without ftp), and refresh the browser window to see how it looks. It's much cleaner and I never loose my file due to crashing. Most browsers (even IE) have web developer tools that you can use in the same way that Dreamweaver allows you to pinpoint elements.

                  This is of course a personal preference and if Dreamweaver actually worked without crashing 15 times a day I might still be using it. But it's a very expensive program and fairly unnecessary because a text editor (even plain old Notepad) and a browser page pointed to the url works just as effectively (if not better IMO). Manually typing code also allows you to learn and commit to memory things that using Dreamweaver shortcuts and buttons don't. I think it helps me to understand what I'm actually doing far better. I will say that I do miss the css color editing options that Dreamweaver has. Figuring out what color the hex code actually is is simple when you can see it right in the editor.
                    Frogabog- MODX Websites in Portland Oregon
                    "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                    Having server issues? These guys have MODX Hosting perfected - SkyToaster
                    • 38058
                    • 25 Posts
                    I sure appreciate your lengthy explanation it is very helpful and I understand now, I was starting to think I had headed in the wrong direction. I thought that dreamweaver was crashing because of things I was doing or maybe my computer. Everything you say about dreamweaver is 100% true I have had the same trouble. Sometimes when you clicked a link to another page things like the header would jump and be in a different place, it would take hours to figure out what in the code was causing it.

                    I tried Drupal for a while but never got where I had a web site going and gave up Modx seems less complicated and I am enjoying it so far. I will look into Notepad ++ but until I learn more coding I will have to rely on Dreamweaver.

                    Thanks again [ed. note: climberman last edited this post 14 years, 9 months ago.]
                      • 10208 ☆ A M B ☆
                      • 1,780 Posts
                      There are a number of decent WYSIWYG editors available. I've tried kompozer and it works well enough but it doesn't have a combined code and design view which I find frustrating. I really do have to see the actual code to understand what the heck is going on.

                      Do a google search for "WYSIWYG editor free". There are plenty to choose from

                      You're going to want Notepad++ regardless of if you use it for coding or just viewing files. You'll want to use that to view and edit files like your .htaccess and .php files, amongst various other file types. Regular Notepad is extremely underwhelming once you use Notepad++.

                        Frogabog- MODX Websites in Portland Oregon
                        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                        Having server issues? These guys have MODX Hosting perfected - SkyToaster