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)
- Allow authorized users to post articles (Including members and staff people)
- User registration option
- Allow registered users to post comments on the articles and rate them
- Option to have member only page (pages that require login)
- Option to create as many as pages of the content articles with xx number of categories / sub categories
- Integration with the forum software
- Integration with the custom PHP code (Couple of customized requirement)
- Opinion poll on the site
- Different layout for the home page and different for the inside pages (content on the the left column changes)
- RSS Feeds
And this is how my work started…
- Coded a CSS / XHTML based layout for the site
- Installed Modx on the local server (Installed for the first time)
- Studied the system for sometime, understood how it worked, the template system, chunks, snippets etc…
- 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.
- Created a new chunks for common areas of the site. Left Column, Header, Footer etc…
- 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)
- 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.
- Added the content for the home page (it accepts HTML) and I am done with the home page.
- 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
- So now, I first created one chunk for left column for static inside pages.
- Created a new template for inside static pages (copied the code from main template and replaced left column chunk with the new one)
- That’s it, I am done with the inside static pages.
- Now I just had to create static pages and choose inside page template while creation.
- 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.
- 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.
- 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.
- 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…
- 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)
- 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.
- Now rating system, Poll system is left, integration of custom code is left.
- For rating system, I am going to use one of the free plugins available on their site.
- 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)
- 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.