This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: Internet & WWW

MODx: A promising open source CMS

By Chen Nan Yang on January 14, 2008 (4:00:00 PM)

Share    Print    Comments   

MODx, an open source content management system (CMS) and PHP application framework comparable to WordPress or Movable Type, recently won Packt Publishing's Most Promising Open Source CMS award. The application works with either Apache or Internet Information Services (IIS) and supports almost any browser.

Install MODx

MODx requires that your Web server have PHP and MySQL installed. To install MODx, download and unzip the latest MODx version to a folder on your hard drive. FTP the unzipped files and folders in the MODx directory (e.g., c:\temp\modx- to the root of your Web site, then open http://yoursite/install/index.php to begin the installation process, where yoursite is the URL of your Web site.

Select your language (English, French, German, Russian, Spanish, or Swedish), agree to the license terms, and choose whether you want to start a new installation or upgrade an existing install. If you're upgrading, be sure to save all your unique or customized files, such as images, Cascading Style Sheets (CSS) files, and custom snippets, and back up your database before you continue.

Enter your database connection and login information, and if you have one, enter the name of the database you created for MODx. If you don't have a database yet, the installer will attempt to create a new one. This may fail depending on the MySQL configuration or the database user permissions, in which case you may need to contact your Web hosting administrators.

Next, create a default MODx administrator. Specify an administrator account and a password, which you'll need to log in and set up your Web site after installation. Choose optional items, including various chunks, plugins, modules, or snippets, and click Install. You're taken to the pre-install validation page, which carries out a number of checks to see if everything is ready for the final installation. If everything works correctly, you'll see "Installation was successful!" After installation, delete the install folders (e.g., http://yoursite/install/) for security reasons.

Set up and manage your Web site

MODx is easy to use, but if you want to do a little customization, you'll need some knowledge of HTML, PHP, and CSS. To log in and begin managing your Web site, go to MODx CMS Manager at http://yoursite/manager/index.php and enter the administrator account and password. Go to Site -> New Document to create a new Web page. You can create content, choose a template, decide when a page will publish, select metatags or keywords, and more. To edit an existing page, click the page title in the left panel of the MODx manager.

MODx lets you select metatags and keywords on every Web page that you create or edit, which helps with search engine optimization (SEO). To add new metatags or keywords for selection, go to Resources -> Manage META tags and Keywords.

Templates make it easy for you to control the layout and appearance of your Web site. MODx's templates are HTML documents that contain special MODx tags, which are replaced with specific content when you generate the page. If you don't like an existing template, you can edit it or create a new one in Resources -> Manage resources -> Templates.

MODx offers a flexible template system and elements such as chunks and snippets to help you control the structure of your Web pages. Chunks let you reuse blocks of code or HTML on your Web site. For example, you can incorporate them in a template as repetitive footers, addresses, contacts, copyright information, and so on. Go to Resources -> Manage resources -> Chunks to customize chunks.

Snippets are pieces of PHP code that you can incorporate into templates for adding dynamic behaviors to your Web site. For example, you can use them to create menus or determine who is logged in. Go to Resources -> Manage resources -> Snippets to customize them.

With templates, chunks, and snippets as building blocks, you can focus on the design and content of a great Web site, not on the tools that build them. These items can be nested in various ways -- for example, templates might contain chunks, chunks might contain snippets, and snippets might run inside of other snippets.

MODx also offers template variables, which you can use for such things as an always-present floating display box, such as a marquee or a ticker, that scrolls or changes content on your Web site. You can use modules to group a set of subprograms and data structures to promote encapsulation (i.e., information hiding) through a separation between the interface and the implementation.

MODx provides a range of administration tools. It lets you manage site security by specifying users, roles, and permissions. You can create or edit roles with various management levels for content, template, snippet, chunk, plugin, module, and permissions, and assign users to them. You can use the Tools menu to back up or download selected tables, import an entire HTML site into the database, or do system configuration. From the Reports menu, you can see the detailed log of the Web site.

MODx's administration interface integrates almost all the functions together. The AJAX interface make it easy to navigate and use; the tree-style layout help you managing not only the pages, but also other contents as well.

With MODx's excellent flexibility, you can get unlimited control of the design of your Web site.

You can read more about MODx's functions in the Developer's Guide.


MODx is an easy-to-use, standards-compliant, search-engine-friendly, functional, and extensible CMS. Some developers complain that the MODx community doesn't offer enough support. However, with version 1.0 looming, expect improved performance of this Most Promising Open Source CMS winner.

Chen Nan Yang is a Chinese freelance journalist and former IT director in the Chinese government.

Share    Print    Comments   


on MODx: A promising open source CMS

Note: Comments are owned by the poster. We are not responsible for their content.

(FILL IN THE BLANK) is a new promissing open source cms

Posted by: Anonymous [ip:] on January 14, 2008 05:40 PM
"(FILL IN THE BLANK) is a new promissing open source cms" I am not impressed unfortunately. After using modx, and to many other cms, I have this to say: learn to program! This might sound like a pointless rant, but hang with me for a second. Until programmers know patterns, and follow them strictly, you will have very many promising projects that all end in decay and wonderful tasting spegatti code. Seriously, does this kind author of modx know the difference between builder and abstract factory? Ask yourself where is there already 100 open source php cms projects out there. They start with so much potential, but follow the same slack standards as everyone else. Modx isn't test driven either.

After the long depressing study of most worthy cms out there, I found this:
Modx - decent, but the main killer for me is that html is stored in database, which
means my designer can't go in with his WYSIWYG tools. Not a big deal, and I would have stuck
with it if it wasn't for this. I also plugged in Wordpress for a blog.

Lenya- strongest showing, and best focus for what cms should be. Template customization is
a pain, but better than other projects. Html is saved to xml, which works great in WYSIWYG.
Authoring is pretty easy, and nearly logical. Code is maintained by the apache foundation, and is test-driven.
Great modularity for design since it relies so heavily on css.

Plone - robust, many features, test-driven, based on Zope, and that's it's weakness. Zope being a framework,
in my opinion, the learning curve is so terribly high and unmanageable, this must be simplified. A framework can't
make everyone happy in my opinion. Oh, just try to customize the header in Plone, while maintaining it's original widgets.
It's a terrible, boring quest, and I don't suggest it for any of you!

So, I ended up making a simple template of my own: nice htaccess, error pages, mod_rewrite rules, header/footer inclusion, keyword /description insertion, and a couple other simple things. I plan to release this simple method for simple websites later. I tried and a couple others, but was very unhappy.

Should you want to make a web application, my vote is codeigniters php framework. It's decent.
Adam Temple


Promising? Why are PHP and MySQL prerequisites? What if I want to use PostgreSQL?

Posted by: Anonymous [ip:] on January 14, 2008 07:02 PM
Not customizable = not promising.


MODx: A promising open source CMS

Posted by: Anonymous [ip:] on January 14, 2008 10:24 PM
"the main killer for me is that html is stored in database, which means my designer can't go in with his WYSIWYG tools"

I've seen CMSs that store markup in databases but provide WebDAV/SFTP/FTP/etc edit access so that WYSIWYG tools can be used. Your assertion that storing content in the database prevents this is ill-informed.



Posted by: Anonymous [ip:] on January 18, 2008 05:58 PM

It appears that you have a lot of misconceptions about what MODx is and isn't. MODx is a framework and isn't just another portal system. It's a highly flexible open-ended framework that allows you to build sites with web standards in mind. And, you're right, a CMS like Plone can be a real pain in the ass to work with.

I've tried most of the other PHP based CMS apps out there and the one thing that always turned me off with them is the the proprietary nature of their templating systems. They're just too complex. I always felt like I should be able to build a template around my site design rather than building my site around a particular templating system. And that's what MODx allows you to do. The templating capabilities in MODx are not complex at all. In fact, you can pretty much built templates any way you want and use placeholders for information like the title of the page, javascript includes, and the like. So, unlike other CMS apps that have highly complex and confusing templating systems (Plone, Joombla, just to name a few) the MODx templating system is an absolute breeze by comparison.

Every CMS stores some HTML code in a database. That's just how a CMS works. Some, like Movable Type, will allow you to spit out the site as HTML files on the server. Others, like MODx, use a caching system so that calls to the database are kept at a minimum and reduce bandwidth. It the case of MODx, most pages can be loaded from a cached version and a call to the database isn't even required. So why exactly is it a problem that HTML code is stored in a database?

On a similar note, MODx doesn't limit designer from not using WYSIWYG tools. In fact, it's just the opposite. Template can be built using just about any HTML coding apps out there (including Dreamweaver!). A designer can then implement a template by simply replacing certain parts like the title, content, and such with simple placeholders that the MODx parser understands. The result is that the end user (the person actually keeping the site up to date) doesn't have to fuss with any HTML code and can realistically keep the site up to date with very little knowledge of HTML code. That's what business owners want and that is what MODx empowers web developers and designers to do for those business owners. Can your simple templating system do that?

Also, to really use MODx to the fullest, you have to know how to program. Plugins, snippets, modules, and the like are all written using PHP. You can't write any of this stuff on your own if you haven't learned how to program with PHP. Good, well written plugins, snippets, and modules do follow patterns and are highly reusable. It's only the bad one that turn into spaghetti code. And that's what MODx is all developers the tools to write highly reusable code in an environment that is friendly to end-users. Reality check, chief...if you're not writing for end-users then you're screwed.

In regards to other're right, PostgreSQL isn't currently supported....but it will be! The guts of the MODx parser has been completely re-developed and built off of xPDO ( I'm not sure yet about the time frame but it should be released before the middle of the year. :)


Thats good, i will be happy to see simple to use and customized CMS

Posted by: Anonymous [ip:] on January 23, 2008 05:32 AM
I will wait for it


MODx: A promising open source CMS

Posted by: Anonymous [ip:] on February 01, 2008 03:06 PM
I begin to work with this CMS. After Joomla using the MODx seems like very easy and comfortable to use.


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya