MODx Newbie FAQ
Do I have to pay anything to use MODx?
Is there a Fantastico script for installing MODx?
Where can I get the latest stable version of MODx?
The installation instructions refer to an "archive" file. What is that?
The installation instructions refer to the "root" directory. What is that?
If you are using XAMPP or any other local version of Apache, the root is usually the htdocs directory (on Windows with XAMPP, for example, it's often C:\Program files\xampp\htdocs).
In Windows Vista, many users install XAMPP to the C:\xampp directory -- in that case it would be C:\xampp\htdocs.
Do the files have to go in the root directory?
If you will have more than one web site on your server, you'll probably want them just below the root (e.g. public_html/my_site, and public_html/my_othersite).
The instructions say I should change the permissions on some files and directories. How do I do that?
If it's a remote machine, you can change permissions by going to cPanel (or the equivalent) at your host and clicking on "File Manager." In File Manager, you navigate to the file or directory you want to change (your site will normally be under public_html). You'll see the permission numbers on the right as you go. When you get to the target file or directory, click on its name, then on "change permissions."
You can also change permissions from within many FTP programs, usually either by right-clicking on the file, or by selecting it and clicking on a "permissions" icon.
Should I install MODx locally or on a remote server?
Look here to see the steps involved.
Where can I get a server that will run on my local Windows machine?
You can download the latest stable release of XAMPP for Windows here.
Is there a server for Mac OS X?
How about a linux version of XAMPP?
I have MODx installed: Now what?
Where do my files/documents/pages go?
Go here for more information about the process and here for more information about how to create new documents.
When I try to install MODx, I get a message telling me that the connection to the database failed. What does that mean?
If you have already created the database, check your config.inc.php file in the manager/includes directory to make sure the settings for the database at the top of that file are correct.
The "create new document" form has a lot of fields. Do I need to fill in all of them?
What's the difference between the "Published" and "Show in Menu" checkboxes?
How do I get to the MODx Manager?
You'll see the manager log in page and you'll need to enter the username and password you created during the install. Don't forget to write down the password during the install.
The default initial username is "admin" but you should change it to something else to make the site more secure.
How should I organize my site?
Most MODx sites are laid out in a hierarchical tree just like any other web site (also like the directory structure on your hard drive).
Once I've created a new web page, how can I preview it?
If you have designated the page as Published, you can also navigate to it in your browser by putting the full URL of the page name in the browser's address bar or through a menu at your site (if you've created one). If you're logged on as a Manager, you can see the page that way even if it's not published. You can also see a page by selecting the Preview tab of the Create/edit document window.
What does it mean for a document to be "Published"?
You can also remove pages, temporarily or permanently, at any time by unchecking the checkbox.
MODx also gives you the option of setting a published date and/or an unpublished date for a document.
Documents with dates set will automatically appear on the site on their published date and disappear on their unpublished date.
Go here for more information about creating/editing documents and the various document settings.
What is a template?
Templates are discussed in more detail here and here.
What is a chunk?
What is a chunk call?
What is a snippet?
When MODx sees the snippet call, it finds the snippet, has it generate the output, and puts that output on the page in place of the snippet call.
Go here to learn more about snippets.
What is a "snippet call"?
A snippet call looks like this:
Why isn't my snippet call working?
1. Snippet names and parameters are case-sensitive. Make sure you spelled your snippet name correctly. "startID" will not work if "startId" is expected.
2. Snippet parameters must be enclosed in backticks, not single quotes. The backtick character is usually on the ~ key.
3. Each parameter in a snippet call must have an ampersand character in front of it. These are easy to forget.
4. There should be no spaces around the equals signs in a snippet call.
When do I use a Snippet and when do I use Chunks?
Another way of putting it is to say that chunks can contain only HTML code (no PHP), etc.).
If you have something you want to appear on many pages and it can be expressed without PHP code (including links, images, anchor tags, JavaScript, etc.), you want a chunk.
If you need to generate something dynamically using code when the page is requested, you want a snippet. Note that there are many built-in snippets you can use in MODx without knowing anything about PHP or Javascript (though learning a little PHP will certainly help you get the most out of MODx).
I see references to static and dynamic content. What does that mean?
Dynamic content, is content that changes. For example, you might greet the user by name when he or she logs on to the site or you might have a page that contains a directory listing of downloadable files that is generated "on-the-fly" from the contents of the download directory. These are examples of dynamic content.
The MODx cache: what is it?
When MODx renders a document, it has often has to perform a number of tasks behind the scenes before the document is sent to the browser. When a document is marked as "Cacheable," MODx stores the result in the cache so that the next time the document is requested, it can serve up the cached version without performing all the background operations.
Go here to learn more about the MODx cache.
When should I use the cache?
What if a snippet on the page produces information that changes every time the page is visited?
To tell MODx to call the snippet uncached, use the following form for the snippet call (the exclamation marks are the only difference):
Where do .CSS files go?
For convenience, some people put .css files in an assets/css folder. For performance, others put .css files in the root MODx folder (where index.php lives). If you create your own .css file, it's up to you where it goes.
How do you do menus in MODx?
The two menus on the right side of this page are each generated by a single line of code (a Wayfinder snippet call), written a long time ago. As the site grows, they automatically include the new documents.
What can I edit and what should I leave alone?
If you are good at PHP, you may decide to hack the MODx code or the code of specific snippets to get particular effects you want, but this will interfere with upgrading to new versions of MODx and very sophisticated MODx sites can be created with no hacking at all.
How do I upload a finished local project to a live remote server?
I have some data in a database that I'd like to access on my MODx site. What's the best way to do this?
Once it's in the MODx database, you can access the data with the MODx DBAPI, usually in a snippet.
How did you create this marvelous FAQ?
Thank you for visiting BobsGuides.com
— Bob Ray
