We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    I read a post from Shaun some weeks ago about organising your code for CMP development but I can’t find it anymore (note to self: bookmark!!!!! embarrassed).

    Anyway, here’s my question: I currently develop my CMP’s in the MODx directory (core/components/ and assets/components) on my local machine. Although this works it has disadvantages.

    Ideally I would like to develop outside the MODx directory structure. I suppose that requires some tweaking in MODx so my code is accessible to MODx.

    How would I go about doing that?
      MODx Revolution / MAMP / OS X
      • 1778
      • 659 Posts
      Hello

      Do you refer to this post from Shaun (I bookmarked it ^_^) http://modxcms.com/forums/index.php/topic,48952.msg286100.html#new ?

      You have too this video from MODxpo, http://www.amdbuilder.net/assets/files/modxpo/small/twovideo5.mp4

      It can be of use...
      Cheers
        • 27519
        • 275 Posts
        Quote from: anso at Nov 09, 2010, 11:26 AM

        Hello

        Do you refer to this post from Shaun (I bookmarked it ^_^) http://modxcms.com/forums/index.php/topic,48952.msg286100.html#new ?


        Yep, that’s the one! Thanks a lot!

        The video has to wait. My internet speed is awful at the moment. Bloody BT and their pre-WW2 exchanges >:( >:( >:( >:(
          MODx Revolution / MAMP / OS X
          • 27519
          • 275 Posts
          Hmmm.... very interesting post by Shaun


          This is good in a couple ways - one, it allows me to do development straight from my SVN checkout of Quip (or whatever 3PC), as the files are outside the MODx webroot and are ’checked out’ by SVN. So I can work on Quip, and then immediately commit.

          Yes. I wanted to setup my local Git and soon realised that I would have to bring the whole lot of MODx sources under Git which is not ideal. I just want the two directories that make up my component.

          I find it easiest to build it outside the file path of MODx, and add 2 System Settings to tell MODx where the files are.

          I understand the principle but will these settings be removed once the component is package ready? Are they "development time" settings? I inspected Quip and only found one setting, namely the one provided with the namespace. The other setting wasn’t there and if I remember correctly it is reconstructed using the name space of the component.

          i’ve put my 3PCs in a ’workspace’ directory, which is web accessible in my localhost via http://localhost/workspace/
          How do I do that? Sorry if I’m ignorant but configuring Apache is at the very bottom of my skill set... embarrassed

          Then my component uses those settings to tell itself where its files are. All the snippets have this as their first line...
          I assume that a "snippet" is a piece of PHP code that belongs to the component/CMP. I checked the code for Quip and did not find these lines of code.

          Is this post still the proposed way of working?

          I work with MAMP, so my MODx install is at : /Applications/MAMP/htdocs/modx
          My component is now at: Applications/MAMP/htdocs/modx/ core/components/Tariff and Applications/MAMP/htdocs/modx/assets/components/Tariff

          Ideally I want the component under: /Users/MyName/Development/Tariff/server (for all server related sources) and /Users/MyName/Development/Tariff/client (for the client side stuff)

          Is that possible? (Sorry for the really long post)

            MODx Revolution / MAMP / OS X