A technical post after a very long time I guess. I think this post should save this blog from being a movie review blog haha.

I have been playing around a lot with this CMS called MODx recently. I knew about this CMS for quite sometime but for some reason I was stuck with TextPattern but now recently when I got a requirement to develop a site with some advanced options and features, I decided to try MODx and I must say, it is one of the best CMS I have ever tried.

Earlier I was a fan of TextPattern, actually still I am. But now Modx takes a top place in the list. This CMS needs more of understanding of the system rather than just logging in and pressing the new post button. It might not be as friendly as joomla but it is surely a rock solid CMS with lot of flexibility on the design and coding part.

I mean, it just allows me to play around with whatever I want…The site I am working on has following requirements: (Apart from the custom designed layout)

  1. Allow authorized users to post articles (Including members and staff people)
  2. User registration option
  3. Allow registered users to post comments on the articles and rate them
  4. Option to have member only page (pages that require login)
  5. Option to create as many as pages of the content articles with xx number of categories / sub categories
  6. Integration with the forum software
  7. Integration with the custom PHP code (Couple of customized requirement)
  8. Opinion poll on the site
  9. Different layout for the home page and different for the inside pages (content on the the left column changes)
  10. RSS Feeds

And this is how my work started…

  1. Coded a CSS / XHTML based layout for the site
  2. Installed Modx on the local server (Installed for the first time)
  3. Studied the system for sometime, understood how it worked, the template system, chunks, snippets etc…
  4. Started the work on it, since everything was database driven so I did not have to play around with the php files to create a new template. All I had to do was, upload images and css files in some folder of the site.
  5. Created a new chunks for common areas of the site. Left Column, Header, Footer etc…
  6. Created a new template for the home page, the code remains same as mine just I had to put code to include the chunks in the template. (Chunks can be read as PHP include files in simple language)
  7. Now at this point, home page layout was ready, the only thing remaining was, to post the home page content by creating a page for home page.
  8. Added the content for the home page (it accepts HTML) and I am done with the home page.
  9. Now inside pages, now inside pages had 2 different types.
    • Static Pages – Which had a common left column
    • Dynamic Pages -Which had sub categories link on the left column
  10. So now, I first created one chunk for left column for static inside pages.
  11. Created a new template for inside static pages (copied the code from main template and replaced left column chunk with the new one)
  12. That’s it, I am done with the inside static pages.
  13. Now I just had to create static pages and choose inside page template while creation.
  14. I followed the same procedure for the dynamic pages but to display only sub category list on the left side, I used a downloadable snippet (Wayfinder) from MODx site.
  15. I created a chunk with my custom CSS style for this purpose and added the syntax of the snippet to display values from the database.
  16. Again a new template for this also, created categories / sub categories, added pages inside the same and I am done with the inside dynamic pages too.
  17. Okay, so now, template work is done, now I will have to fix up some of the things like poll, login system, add custom PHP code etc…
  18. I started with the login system and registration system…Modx already has snippets for the login forms, so I just had to use those snippets but modify the HTML part of it to match my design. So I quickly finished that part too. (Though first it took me few minutes to figure out the whole thing)
  19. Now comments part is left, just copied the syntax to display the comments from a pre-installed snippet. Design part of the same I took care from the CSS file. So that issue is also fixed.
  20. Now rating system, Poll system is left, integration of custom code is left.
  21. For rating system, I am going to use one of the free plugins available on their site.
  22. I can see the poll system already present as a free module but I needed an advanced system so I made a request for the same in Modx forums. (obviously will pay for the work to the coder)
  23. For integration of the custom code, modx has option to add it in the form of Snippets but here the case is different, I have a custom script which needs to be integrated. So I am first going to get it done from my programmer and then get it integrated from one of the Modx Moderators or coders from their forums. (Again, will pay for the work)

The purpose of writing these points is to explain that, how easy and flexible the system is. I just had to study how the template system works. (Which takes around 10 minutes max to look around) then I had to understand what are Chunks (Set of HTML code) and Snippets (Set of PHP code) and you are done.

What I most liked about this system is, separation of code from the PHP and flexibility of the CMS to change the design and customize the CMS according to my needs.

If I was using some other CMS, then I might had to create a template first using PHP or Template files and the design would have been kind of rigid for all the pages but here I was able to customize the CMS according to my needs, where in the earlier case I would have to customize my design according to the CMS.

I would not suggest Modx for the ones who are lovers of CMS like PHP Nukes, Mambo etc.. but this CMS is more for the developers and the ones who needs flexibility with the content management system.

You can checkout the demo of MODx here and if you have any difficulties with customization, MODx forums are the best place to ask. (Very active and helping place, I must say) and finally if you like this CMS, nominate it here for the CMS Awards 2006.