MODX: The Official Guide

MODX: The Official Guide

Building dynamic websites with the MODX content management platform.

  • Construct any site you imagine—without compromise. MODX gives you total creative freedom.
  • MODX is a content management platform that lets you fit the tool to your website, not the other way around.
  • MODX makes custom sites faster to build. It gives you back your time so you can finally do that project you put off for so long.
  • Output exactly what you want, dynamic XML, HTML, or anything else you need.

English | Epub, Mobi, PDF, and HTML | DRM Free


772 pgs | English | 08-2011 | ISBN 978-0-9836194-0-6

MODX Reviews

MODX: The Official Guideis a comprehensive reference for things MODX. It’s a great how-to guide for beginning MODx users as well as an excellent tool for seasoned MODX developers. You won’t be disappointed by this book—it belongs on the desk of every MODX user. Ryan Thrash - MODX Co-founder & CEO

Read More Reviews Below
About the Author

Bob Ray - AuthorBob came to MODX from a background in C++ programming. He took one look at MODX and fell in love. He has been a relentless gadfly with respect to MODX terminology and how to connect users to the underlying architecture of MODX via the Manager user interface. His motto is “developers are users too.”

Learn More
Bob Ray Bio

Bob Ray

Bob came to MODX from a background in C++ programming. He took one look at MODX and fell in love. He has been a relentless gadfly with respect to MODX terminology and how to connect users to the underlying architecture of MODX via the Manager user interface. His motto is “developers are users too.” He is the author of many MODX Revolution 2.0 components, including QuickEmail, SPForm, EZfaq, ThermX, Personalize, NewsPublisher, MyComponent, ActivationEmail, and Captcha. Bob’s MODX site,, has been a source of information and inspiration for countless MODX users.

Bob is a former ski racer and competi- tive windsurfer and he played lead guitar in a punk rock band for several years. He lives much of the year in his RV, wintering in Florida and spending his summers in the Pacific Northwest.

Get a Free Sample Chapter of the print edtion

Download a Free Chapter

About the Book

MODX is an advanced Open Source Content Management System (CMS) that runs on virtually any modern web server. If you are not familiar with the term CMS, think of a word processor for web sites, but on steroids. A CMS usually provides a graphical view of your web site, a database that stores the site’s content, and one or more editors for creating web pages and populating them with links, images, videos, and formatted text. Using a CMS makes your web site easier to maintain and opens the door to count- less dynamic improvements.

MODX is also a powerful Content Management Framework for experienced web developers. This means that the building blocks of MODX can actually be used to create any number of different CMS platforms. One guiding principle of MODX is to impose as few restrictions on the web developer as possible. MODX places no limits on the CSS or HTML code you use to build your site and you can easily add PHP or JavaScript code to meet any need. One illustration of this flexibility is that you can take virtually any existing web site and make a MODX web site out of it that looks exactly the same to a front-end visitor. Trying that with many other CMS platforms will leave you cursing and tearing your hair out.

By the time you’ve finished reading this book, you should be able to use MODX to create new web sites or to port existing web sites to MODX. The goal of this book is to provide all the information you need to use the basic building blocks of MODX to meet your needs as a web designer/developer. Although the book focuses on MODX Revolution, many of the concepts explained apply to MODX Evolution as well, and there is a section at the end of each chapter containing notes for MODX Evolution.

MODX: The Official Guide - Table of Contents



About This Book

About MODX

Chapter 1

How MODX Works
The MODX Database
MODX vs. Third-Party Components
The Back End vs. the Front End
Basic MODX Building Blocks
How MODX Delivers a Web Page
Transport Packages
Other MODX Concepts
MODX Evolution Notes

Chapter 2

Installing MODX
Installing the Current Stable Release
Installing Add-on Components
Friendly URLs, Friendly Aliases
Installing MODX on Your Local Machine
Porting an Existing Site to MODX
MODX Evolution Notes

Chapter 3

The MODX Manager
The Resource, Element, and File Trees
The Top Menu
MODX Evolution Notes

Chapter 4

Static Resources
Template Variables and Access Permissions
Other Resource Operations
MODX Evolution Notes

Chapter 5

Templates and Template Variables
Creating a Template
An Example Template
Example Template: A Closer Look
Deciding What to Put in a Template
Using Tags in a Template
Template Variables
MODX Evolution Notes

Chapter 6

Chunks and Properties
Introducing Chunks
Creating a Simple Chunk
Using Chunks with Other Tags
Other Uses for Chunks
Introducing Properties
Sending Properties in the Chunk Tag
Default Properties Versus Property Sets
Working with Default Properties
How Default Properties are Used
Property Sets
MODX Evolution Notes

Chapter 7

Snippets and Plugins
Working with Snippets
Working with Plugins
MODX Evolution Notes

Chapter 8

Advanced Snippet Operations
MODX get*() Methods
Object Methods
Working with Resources, Elements, and Users
MODX Evolution Notes

Chapter 9

Site Organization and Contexts
Site Organization
MODX Evolution Notes

Chapter 10

MODX Security
Security System Overview
Security Elements
Working with MODX Security
Controlling Access in the Front End
MODX Evolution Notes

Chapter 11

Customizing the MODX Manager
Altering the Top Menu
Form Customization
Custom Manager Pages
MODX Evolution Notes

Chapter 12

Using Common MODX Components
Installing Components and Creating Property Sets for Them
Creating an FAQ Page with EZfaq
Creating a Contact Page with SPForm
Using Breadcrumbs to Show the Current Path
Using Wayfinder to Create a Menu
Using getResources to Aggregate Content
Using FormIt to Create and Process Forms
MODX Evolution Notes

Chapter 13

Creating Transport Packages
Transport Package Overview
A Simple Transport Package
MODX Evolution Notes


PHP Primer
MODX Objects Reference
Using SMTP to Send Mail in MODX
MODX System Events

Book Index

Another Tab T3

Reader Reviews

14 Reviews

  1. MODX: The Official Guide is a comprehensive reference for all things MODX. It’s a great how-to guide for beginning MODx users as well as an excellent tool for seasoned MODX developers. You won’t be disappointed by this book—it belongs on the desk of every MODX user.
    1. This book stands alone in its comprehensive coverage of the fundamentals of MODX. Whether you're a site builder, designer or down-and-dirty developer, this book is a must-have.
      1. I've written a long review of this book on my blog. In summary, I definitely recommend this book if you're serious about learning MODX. It's quite comprehensive, and definitely well worth having. You can read my complete review at
        1. This book, Modx: The Official Guide, is a fantastic addition to the arsenal of ever growing resources. Whether you've been building sites with Modx forever or you are completely new to the framework, you will find valuable information, tips and advice which will help develop your skills and knowledge further. Great stuff!
          1. Wow! I finally feel like I can grasp Revolution now! :)

            1. Caroline Telfer
              WHEN is my book going to arrive? I made the pre-order ages ago, and I am still waiting...

              1. Gary Schelling
                Enjoying the book, but wondering where the code samples are? I'm following along with all the examples, but in the Snippet chapter (Ch. 7) I would really rather not type out all the code on pages 285-6.

                1. Gary Schelling
                  Experienced web and graphic designer, just starting to work with MODx: 1 Evolution site, with 1 Revolution site in development and 2 more in the early planning stages.
                  Hey guys, so far, so good. I had purchased the Packt book, but I'm finding this one so much more useful so far.
                  But ... I'm wondering when the code from the book is going to be available for download...? There's a long snippet in Chapter 7 that I don't want type out!
                  1. I am just learning Modx and find the section on git hub to be very premature in the book. I would rather have it in an addendum or a late chapter after the 'basics' are under control.

                    1. The first chapter was easy to follow and I would love to get the rest of the book, but I'm waiting for it to be on kindle. I'm trying to keep most my library digital as it's easier to manage.
                      1. The book is complete, relevant and very comprehensive for all - MODX users and developers. Highly recommended.

                        1. ottogal
                          I received your book - opening the parcel was a bit like Christmas...
                          Started reading immediately and in 15 minutes learnd a lot about Property Sets.
                          My better half was astonished to find me not at my PC place...
                          Many thanks to you for this great Guide!

                          1. ModxEvoUser
                            Yes, Revo gives you a lot more possibilities, but not everybody needs all that power. My experience is that Evo is perfect for small/medium websites and small companies. Besides that Evo is a lot faster than Revo when it comes to performance and that stays a very important issue for me not to use Revo. All those cache tweeks and tunings and optimizations are only patches. Revo has just too much web 2.0 stuffed inside to make it shine and show but ends up bloated and slow. At Bob, why not write a book about Evo, the user group would deserve and appreciate it very deeply.
                            Thanks from Lorenzo.
                              Write Your Own Review
                              If you’d like to write a review of MODX: The Official Guide, please use the contact form to submit yours.

                              Bob Ray maintains collection of the few errors and updates for MODX: The Official Guide at his Bob’s Guides Website

                              Get the Code

                              Download the Code Samples from MODX: The Official Guide.

                              Got this far? what are you waiting for?

                              Buy Digital! Buy Print!

                              Checkout using FoxyCart. FoxyCart uses it’s own login but you are welcome to checkout as a guest.