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

    Completely new to ModX, seem’s very very promising!

    I’ve been trying out a few different cms systems lately, after being so p***ed off with Joomla.

    Basically, I want to be able to create a site in xhtml/css with and then with as few as possible alterations put a cms system behind it. Joomla.. well I can’t even begin to describe how frustating it is!

    How difficult (or maybe easy) is it to convert a static website into ModX?

    e.g
    I have a header, menu (with dropdowns) etc. A jquery slideshow of images underneath.
    Then a block of content filling the whole width, then below this 3 columns of content with images and what ever I’d put in there.
    Then a footer with more content.

    And then on another page, same header, without the images, and content, in say 2 columns..

    How would I go about implementing this, say I had a client login after this is done, how would it deal with the content in each column, would there be separate input boxes for each?

    Any tips, advice would be very useful! smiley



    Through trying the different CMS’ the one I’ve found easiest to do, well converting a website, is Concrete5, but I know it’s still a long way off. But I do like the interface of that!

    Cheers!
      • 25663 MODX Staff
      • 12,272 Posts
      There’s some great tutorials on learning MODx: http://modxcms.com/learn/it.html
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 13510
        • 6 Posts
        thanks a lot, will have a good read!
          • 1169
          • 312 Posts
          By your description you have stopped by the right shop!

          You have a bit of learning to do.(see above post)

          XHTML/css dead easy if you just use this for your template.

          Menu (with whatever) use Wayfinder Snippet just parameters and maybe some styling(css) not a train smash.

          Jquery slide show you’ve done it. rolleyes

          2nd Template no images just remove jquery div’s and use 2 colums done in the wink of an eye. wink

          All thats left is the content again no problem MODx is made for this(and plenty more) smiley

          Welcome to the World of MODx.

          Hope you enjoy your stay.
            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
            • 13510
            • 6 Posts
            It seems so! By reading a bit, it seems very good!

            I’ve seen the stuff about Template variables, if I were to change the layout from page to page, should I use these, or make another template? I’ll use a second template for now smiley
              • 1169
              • 312 Posts
              Template variables are very powerfull and can be used for all sorts of things.

              As I am new and just learning I would use two templates as if you use a template that works on all browsers and does what you need all you have to change is the number of colums and the images.

              In MODx there are many ways of doing most things. Some more right than others. The choice is yours.

              I would definitely split my template into chunks as described in most template tutorials.

              Then yours templates will be very similar maybee to lines different calling different chunks.

              Should you need greater flexibility later with different content in side bars and othe stuff you could then easy change to TV’s.


                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
                • 5340
                • 1,624 Posts
                I like using files instead of chunks.

                My template looks like this

                [[includeTemplate? &tpl=`site/home.html`]]


                home.html looks like this

                {{head}}
                <body>
                    {{IE6start}}
                        <div id="wrapper">
                           {{top}}
                            <div id="container">
                                <div id="content">
                                    <div id="campaign" style="background: url([*CampaignImg*])" >
                                        <h1>[*CampaignTitle*]</h1>
                                    </div>
                                    <div id="campaignContent">[*content*]</div>
                                    <div id="highlights">
                                        <div id="highlightsLeft">
                                            <div class="box"><img src="[*Article1Img*]" width="189" height="126" alt=""/>
                                                <div class="highlightsTxt">
                                                    [*Article1Text*]
                                                </div>
                                            </div>
                                            <div class="box"><img src="[*Article2Img*]" width="189" height="126" alt=""/>
                                                <div class="highlightsTxt">
                                                    [*Article2Text*]
                                                </div>
                                            </div>
                                        </div>
                                        <div id="highlightsRight">
                                            <h3>[[GetField? &docid=`63`]]</h3>
                                            [[Wayfinder? &startId=`63` &level=`1`]]
                                        </div>
                                    </div>
                                </div>
                                [[includeTemplate? &tpl=`site/sidebar.html`]]
                            </div>
                        {{footer}}
                        </div>
                    {{IE6end}}
                	{{ga}}
                </body>
                </html>



                and includeTemplate snippet is this

                <?php
                # Snippet to include template files from file system
                # USAGE: [[includeTemplate? &tpl=`mytemplate/template.html`]]
                
                if ( !isset($tpl) || $tpl== "" ) return "Missing Template file!";
                
                $tpl = $base_path .'assets/templates/'.$tpl;
                ob_start();
                include($tpl);
                return ob_get_clean();
                ?>



                Usually I create a folder called "site" in the assets/templates folder and keep all my templates, site componets(images/flash/js/fonts) in there.

                I hope this helps


                Note: Some chunks are not yet in files but I hope you get the idea
                  • 3749
                  • 24,544 Posts
                  Quote from: jamieee at Apr 22, 2010, 10:08 AM

                  It seems so! By reading a bit, it seems very good!

                  I’ve seen the stuff about Template variables, if I were to change the layout from page to page, should I use these, or make another template? I’ll use a second template for now smiley

                  Generally, the fewer templates, the less time you’ll spend on site maintenance. If you can use chunks and template variables (and alternate CSS files) to make the pages look different, you’ll be glad in the long run.
                    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
                    • 13510
                    • 6 Posts
                    I’ll keep that in mind, thank you.

                    As far as chunks go, say I have column 1, 2 and 3, is there a way to get these to appear on the page edit screen? (or maybe its called edit resource) smiley
                      • 13510
                      • 6 Posts
                      Solved that one myself!

                      Used some template variables underneath my content and it appears in the quick edit screen.

                      This seems far too simple so far, haha!