The Future of MODx
MODx is an Internet Content Management Framework (CMF). This means it’s an extended web Content Management System (CMS) that developers use to quickly build custom websites and web applications.
MODx includes support for the latest “Web 2.0” technologies and trends including AJAX (Asynchronous JAvascript exchange), tagging, blogging, RSS feeds, and robust Web Standards (i.e. XHTML/CSS layouts) support.
It’s “Manager” site administration system also works seamlessly in the “big three” browsers: IE Windows, FireFox and Safari.
The Core Concepts
Content
Anything part of the MODx experience when browsing sites is “content” — a web page, a Javascript file, a CSS file, Flash, a link to an offsite location, a downloadable file, an RSS feed and so on.
Templates
Content is displayed through a template. Templates can apply to entire pages, or to just parts of pages (like “blocks” in other CMSes).
Widgets
This is the mojo that makes MODx a dynamic system for custom site and web application development. Widgets are little chunks or objects that serve a pretty specific purpose, and they come in two flavors: static and dynamic. Static widgets are non-changing HTML, XML, text, Javascript, CSS or other similar content. Dynamic Widgets contain PHP code with logic, database calls, or pretty much anything you can dream up. Widgets are called by using the [[name-here]] convention or by listening to system events (covered in advanced technology, below).
Getting Started
Manager
This is the primary control center for all MODx content and configuration parameters. It works just fine, thank you, in Windows IE, Firefox, Safari and Opera. (Safari currently doesn’t work with “WYSIWYG” Rich Text Editors (RTEs), but there are no limitations in the ability to actually edit the content and configurations.)
Content Fields
This is where text, links or files are stored in MODx. There are no real limits to the number of content fields per page in Tattoo/MODx. Content Fields can be simple text fields, WYSIWYG text editors for complex data entry (via Rich Text Editors, or RTEs), pop-up lists, radio button options, etc. Content Fields are called via the [*name-here*] convention, and “[*content*]” is an undeletable default Content Field for every page every page and cannot be deleted.
Links
Internal pages are linked together by referencing a unique ID number that is automatically assigned to each page. Links are called via [~ID~].
Intermediate Concepts
Templates
Designers and Developers assign Templates to Pages, and the Templates almost always contain one or more Content Fields and/or Widgets. Templates set defaults attributes for pages inside MODx, too. These attributes include things like:
- content type (text, html, pdf, xml, etc.)
- disposition (send to screen or initiate a download)
- meta-content (keywords, descriptions, tags, etc.)
- ability to search pages using the template
- ability to cache the pages using the template
- and so forth
Default attributes automatically apply to every page created with the Template, but can be overridden on a per-page basis. Pages can also be reset to their default attribute states.
Static Widgets
These are simply blocks of text, HTML or code that do not contain application logic. They can have parameters passed into them which are simply returned to the browser (think of these as sub-templates, if you will). Static Widgets are typically used multiple times in a site, for example a site footer or copyright line with links.
Advanced Technologies
Dynamic Widgets
These are blocks of PHP code with application logic. These can be used for simple things like conditional display of Static Widgets based on a user’s input in a form, or creating dynamic navigation menus as pages are added to a site.
(Note: please put on your propeller beanie here…) Dynamic Widgets can also be tied to specific system events used by the document parser. These events allow you to trap the default behavior of the system and alter it in some way. This is how the Rich Text Editors convert a text area into a RTE instance. This is also how you can override core system functionality without changing the core system code. An example here is synchronizing user logins between multiple disparate programs.
There are no feasible limits on the number or type of parameters usable by Widgets, and you pass them in with the [[widget? ¶m1=`foo` ¶m2=`bar`]] convention.
@bindings
(Note: pocket-protector required…) These are powerful ways to dynamically attach various data sources to the Content Fields. Content Fields contain a default value that can be overridden on a page-by-page basis as well as input options. @bindings can be applied at either location. @bindings currently work with text files stored on the filesystem, Widgets, Documents, database queries, and PHP code. Future @bindings will include RSS feeds, XML, SOAP, XML-HTTP requests and recursive @bindings.
Formatting Widgets
Formatting Widgets are specialized Dynamic Widgets that are applied directly to Content Fields. Think of them as small extensions/behaviors that take a piece of text or data and transforms it into (typically) more complex elements with dynamic interaction. For example, Rich Text Editors, pop-up list input boxes, display grids or button builders.
Placeholders
These are system resources that are generated on the fly by code (or by system configuration settings) to represent various pieces of data. Placeholders are useful for use in Static Widgets to separate the design of things like forms or pages, from the complex application logic used to construct the output. Placeholders are called via [+name-here+] and can have special modifiers to indicate different sources. For example, calling the main admin account email would be done by [+cms:site_email+].
Modules
These are packages of Templates, database structures, Widgets and Content that can perform functions like altering the way the core system behaves (can be as simple as a single file performing a very specific override to a manager API call with no interface) or as complex as a full-blown integration with a third party application.