We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40447
    • 165 Posts
    I decided to put this in a new post instead of continuing my old thread because of what I think it's importance to save time for modx starters and not to lose unnecessary time, like happened to me.
    I know some of you will say "We'll, aren't those cases obvious ?"
    I say they are not obvious at all except for already experienced php coders who start using modx and experienced modx'ers.

    The following should not stay scattered all over the forum and the web and really be mentioned and explained at the beginning of the help page that is included with a modx installation and at the beginning of the modx wiki where people starting with modx look for help.

    1. You should edit your html, css, php page with your favorite editor outside modx
    with an include snippet.
    2. You should know about a core structure on how to set up a modx website.
    3. You can, if you want, keep track of versions of pages and elements with a repository (git)
    4. Yes, you even can debug your php pages from inside modx

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    Modx comes included with a default wysiwyg editor TinyMCE, so as a newbie you start editing your resource pages with TinyMCE because that's the way you should, isn't it ? After all it is included with modx so it must be right. But then very soon you find out that it is a cumbersome way of editing your html, css and maybe your php.

    So next step is : isn't there anything else then TinyMCE ? So you start looking and you're gonna find and try CKEditor, elRTE, etc. Different wysiwyg but same hassle.

    So then you're going to use your own favorite editor and copy and paste it inside TinyMCE. But all that copying and pasting very soon becomes cumbersome as well and besides that all that code get's wrapped inside the small editing field of TinyMCE and really looks like a mess.

    So then you start posting about it (only reinventing the wheel that's why almost nobody replied)
    but somehow nobody mentions the include command.

    But then after digging the net even deeper, finally you are getting closer to what is already
    being used by all those modx'ers:
    [[includepage? &var=`assets/mypages/page.html`]]
    <?php include($var); ?>

    Note, how this guy is literally mentioning the core of the case: files can be edited in Dreamweaver
    or any other editor without cutting and pasting into the Manager all the time.

    1.
    http://snipplr.com/view/23161/


    By Jove, use an include snippet to get your page inside modx but simply edit it outside modx with your favorite editor. No more copy and paste hassle and no more wrapped up code jungle inside TinyMCE.

    And look here where robb Reply #1 is mentioning the same copy and paste hassle and where allanb reply9 in his post explains a core structure of setting up a modx website that every modx starter should be told about but is nowhere else mentioned, as far as I know.

    2.
    https://forums.modx.com/index.php/topic,62164.msg369084.html


    And this: how to keep track of different versions of your pages and elements.

    3.
    http://www.butter.com.hk/blog/posts/2011/february/modx-file-elements-mirror.html


    But wait, it even gets better. You can even debug your php pages from within modx with well known programs like phpED and NuSphere. Look here:

    4.
    https://forums.modx.com/thread/?thread=47137.&i=1&page=5


    Bottom line: Am I complaining here ? I say not. It's just that obvious and coherent things to know for a modx starter are not obvious and coherent available. The things that really matter for a modx starter are scattered all over the forums and the web. But at least these 4 points should be mentioned first in the modx help and wiki and by anyone who is writing a modx manual.
    Brian.
    [ed. note: sitecms last edited this post 14 years, 2 months ago.]
      • 40447
      • 165 Posts