Layouts
In MojoMotor, a Layout represents an outline that can later be used when building Pages. The benefit of this approach is that information can be presented dynamically by using editable regions and special Tags within your layouts, and common layouts used across your site can be centrally controlled.
Your MojoMotor powered site will consist of, at minimum, one layout, upon which at least a single page will be based.
Important concept: A layout in MojoMotor is the building block of each page on the site. It usually consists of one or more regions which allow for editable content.
Viewing your current Layouts
All the layouts defined within MojoMotor are available simply by choosing the layout icon from the toolbar.
Layout Actions
Adding a Layout
From the layout tab, simply select the "ADD LAYOUT" button.
Editing a Layout
To edit an existing layout, simply select the "edit" link (
) beside the layout you wish to edit.
Deleting a Layout
To delete an existing layout, simply select the "delete" link (
) beside the layout you wish to delete. You will be
prompted to confirm your deletion to prevent accidental layout removal.
Anatomy of a Layout
Layout Title
The Layout Title is simply a title used within MojoMotor to identify the Layout when it is selected from within the Pages tab. It should be a single word, letters, dashes and underscores.
Layout Type
There are 4 types of layouts in MojoMotor.
- Webpage - the most common type. Pages are almost always based on these types, and will be served as regular web pages to your visitors.
- Stylesheet - this layout type is not usually needed, but can be used when you want to enable controlling of stylesheets by users who don't have access to other files. These layouts can be called using the {mojo:layout:stylesheet stylesheet="layout_name"} tag, and will be served as Cascading Stylesheets by MojoMotor.
- Javascript - similar to "Stylesheet" above, this layout type can be used to serve layouts as javascript.
- Embed Contents- a 'partial' page that will not be available as a layout option when creating a new page. An embed may be used inside any of the other layout types. Global regions may be used in an embed, but page regions may not. These layouts can be called using the {mojo:layout:embed layout="layout_name"} tag
Layout Content
Layouts are very similar to HTML pages. If you're comfortable, or even just familiar, with HTML, it should feel reasonably comfortable to you. Layout content is just regular HTML, with the addition of MojoTags. For a good example of how a layout might be structured, install the sample site and view its coding.