User Manual Mason-CM (V 1.2)
Mason Content Management (MCM or Mason-CM) is essentially a web-based file manager, making is easy for users to browse, edit and trigger files from staging to production.
You can click your way down directory levels; enter file or directory paths directly; or execute powerful recursive searches by file name or file contents.
Viewers are included for examining text files, images and binaries. The later only offers downlaod, to view the file localy on your desktop with the appropriate file editor. The editing and vewing screens remember your favorite screen dimensions. While editing a text, html, Mason component files files are locked during editing; others attempting to edit the same file receive a "file in use" error). When saving Mason components, the Content Management editor alerts you to any compile errors. The MCM editor also includes an HTML-friendly spell checker.
If you have a dedicated FTP upload area separate from your staging areas, a file-transfer utility is included for copying files into staging. When you're ready to "go live", content and component files can be triggered (copied, from staging to production) from within MCM.
If version control is enabled, changes to each file are logged in a version history; past versions of a file can be viewed or retrieved at any time.
Once you authenticate yourself with your login ID and password, Content Management greets you with its index page:
Note the Branch Selector on the right. Each branch represents a different filesystem under Content Management; click another branch and note how the directory and file listings change. Keeping track of the current branch is important since all navigation and searching is restricted to the currently selected branch. The branches shown in the branch selector can be customized via the [PROFILE] profile page (link at upper right).
Most of the items on the index page are clickable: click on directories to navigate into them; click on file names to view files; click on the pieces of the current directory to return to higher levels. You can sort by columns in the file listing by clicking the column headers. The rightmost "status" column displays one of "prod", "staging", or "modified" for each file:
Hint: Sorting on the "status" column groups all of your recently-modified files for easy triggering.The [GOTO] and [SEARCH] fields at the top of the page let you navigate by typing a file or directory path, or searching by filename or file contents (searches are recursive from the current directory down). Buttons at the bottom of the page let you trigger or delete any tagged files.
Mr. Juggler, in the upper left, also appears in later MCM sub-screens; he serves to escort you back to the last index page you were viewing.
The simplest type of navigation in Content Management is point-and-click. All subdirectory and file names are linked: click a file name to view a file, click a subdirectory to navigate into it. You can also navigate by clicking any portion of the "Current directory" path. If you have write-access to a directory, [EDIT] links will also appear next to each file--these activate the Content Management file editor (discussed later in Other File Operations).
You can also navigate directly to a file or directory by typing a path into the [GOTO] field. Absolute paths (starting with a "/") or relative paths may be given. These work, respectively, from the root of the current branch or from the current directory. Here are some examples, assuming the current directory is "Content/tw/stories":
Perhaps you've forgotten where you saved that "foo" file? Or you can't recall which component had that slick cookie-management code? Don't despair: Content Management can help by searching for files based on filename or content. Simply type a search string into the "Search" box and hit Return.
Shown here is a simple file name search; to perform content or case-insensitive searches, activate the appropriate checkboxes. Both search types are recursive, i.e. they descend into subdirectories looking for matches.
The "Search for" link brings up a help page listing common searches; for the ambitious there's even a primer on advanced searching with Perl regular expressions.
Files are easily copied from FTP upload directories to the staging area from within Content Management.
To release a file that you've been editing, you must hit one of [CANCEL] or [CHECKIN] from the editing screen. If you leave the editing screen by another route (click [<< GO BACK TO LIST], close your browser or follow a bookmark), you will be reminded of any pending locks the next time you return to the index page:
From this list you can return to the editor by clicking a file name, or hit "release the file" to release immediately.
To create a new text file in the current directory, click Functions [New File]. The in the apeared function form simply enter a filename field and click [CREATE FILE].
MCM creates the file in the current directory, ready to be edited (see Other File Operations below for a description of the Content Management file editor).
File are deleted from the index page by selecting the ones you want to delete and hit the [DELETE] button at the bottom of the page (note the Check all shortcut). If you accidentally delete the wrong file or files, it may be possible to restore them from backups; contact the MCM Admin for help.
Subdirectories are created just like files: simply type in a new directory name in the directory "create" field and hit Return (or the "create" button).
To delete a directory, you must first empty it of all files and subdirectories. At that point Content Management replaces the "Trigger" and "Delete" buttons at the bottom of the page with a "Delete the current, empty directory" button.
Other File Operations: Viewing, Editing, Copying, Renaming
If you've been reading this document straight through (bless your heart), you've probably clicked on a file name or two and discovered that Content Management has viewers for text image and binray files:
To checkout a component or content file for editing, click the [EDIT] link next to the file name. This brings you to the Content Manager edit screen:
The first thing you'll want to do on the edit screen (the viewers as well, actually) is jump to the bottom and set the dimensions of the text window to match your browser. Most current browsers (like Netscape) can record these setting in a cookie; older browsers may forget your dimensions when you leave the edit screen.
At the top of the editing screen, a number of buttons and fields perform operations on the current file:
The next three buttons you get from the Functions menu. Be sure save any changes to a file before clicking the button!
The Content Management editor features an integrated spell checking feature that:
A note about adding words to the dictionary: the dictionary is personal to the user, anyhow be careful when adding words. If you find a misspelled word that's NOT being caught by the spell checker, and you think that's a really normal word, please send it to MCM Admin.
Limitations on HTML characters: be aware the you can not use HTML substitutions for ä, ü, è, à, ô like ä, ü,è, à, ô because MCM does not touch these substitutions.
A primary function of Content Management is triggering files from the development, or staging area to the "live", or production site.
A handy trick (mentioned earlier) is to first sort by the status column to group your modified files. Description of the three buttons releated to triggering, "publishing".
This section is intended for more advanced users familiar with operating systems, searching techniques, and Mason components.
Both filename and content searches can be extended with regular expression syntax (several examples are shown in the "Search for" help screen), letting you compose powerful and detailed search expressions.
Let's start with a simple example of filename searching: type an "e" into the search field and hit Enter. MCM responds with a list of files containing an "e" anywhere in their name. Slightly fancier is "^e", which matches all filenames that start with an "e". Fancier still is "^..e", matching all filenames with "e" as the third character (some regexp stuff to demystify all this: "^" matches from the beginning, while "." matches any single character).
Note that case-sensitivity is turned off by default for both types of searches (filename and content).
Content searching is helpful when you know what's in a file but not it's name (Unix hacks, think of a recursive grep). Like filename searches, content searches are recursive and case-sensitive by default. Also keep in mind that simpler searches are quicker then more complex ones. A search for "Elvis" (the character sequence "Elvis") will be faster than a regular expression like "\bElvis\b" (the word "Elvis") or "Elvis|King" (matches "Elvis" or "King").
See also: Regular Expressions
Special features for components
When editing a brand-new Mason component with the editor you'll see some boilerplate comments -- feel free to embellish these!
During save or trigger operations, components are checked for Mason compile errors, exept ignore compile errors? is checked. Those with errors can either be edited to fix the errors or saved with errors intact (data files, for instance, that happen to reside in a component directory). When triggering components, if one or more of the components contain errors, MCM doesn't revert to the index page, but instead offers some options for dealing with the errors:
Sick components are linked back to the edit page, in which you can immediately view the compile error. Normally at this point you would debug the component in the editor until you get a clean save.
In some cases, however, you may want to trigger files to production with errors intact (non-component data files, for instance). In this case you simply check the files you want to force into production and hit the [FORCE TRIGGER] button.
When working with components in the editor, Content Management checks for Mason compile errors with each save operation. Unless the "ignore compile errors" option is checked, compile errors display at the top of the editor, and hold you back from returning to the index page:
Online Mason Manual learn everything on Mason syntax
Online Perl Documentation the standard perl.pod