3. Page Elements Tags
Prev | Chapter 7. Tag Library | Next

## 3. Page Elements Tags

### 3.1. pagetitle

This tag prints the title of the page. It has one attribute:

- `default`: default title to be used when the page has no title. This attribute is optional and its default value is `&nbsp;`.

Example 7.3. A simple title

    <title>My Site: <mesh:pagetitle /></title>

### Note

the use of `pagetitle` is not limited to the HTML `<title>` tag: you can use it elsewhere to repeat the title of the page, and you can use anything else within the HTML `<title>` tag.

### 3.2. module

This tag allows to include a module in the place where it is located in the page.

Attributes:

- `name`: the description of the module content, in the form `template:argument`. The template can be omitted: in this case the colon can be omitted too, and the Include template will be used. The fact that this attribute is called name can be misleading: it is a heritage of a previous version;

- `date`: the format of the date. This is passed to the include template and might be used or not (for example `Include` uses it). Possible values are `none` (default), `normal` and `full`;

- `style`: a css style. This is passed to the include template and might be used or not (for example `Include` uses it). Default is no style;

- `location` (required): the name of the module location. All modules in a theme must have different location names;

- `alt`: a string that is inserted when the module is not used (default `&nbsp;`);

- `parameters`: a string that contains advanced module parameters and their values.

Example 7.4. A fixed module that includes some files located in the `/include/news` directory

    <mesh:module location="news" name="includes/news" date="normal" style="news" />

Example 7.5. A module that can be configured while editing the page

    <mesh:module location="bottom" />

Example 7.6. A module that shows a site map starting from the directory of the page, using `(none)` to pass an empty argument:

    <mesh:module location="sitemap" name="site_map:(none)" />

A note about locations: suppose to edit some pages using a theme that contains two configurable modules, whose locations are left and bottom. Modules will be saved in the page with those location names. If you change theme, those modules will appear if the new theme contains configurable modules with the same location names. So it suggested to use common names for module locations. This is a possible convention:

- `left` for a module in the left column;

- `right` for a module in the right column;

- `top` for a module at the top of the page;

- `bottom` for a module at the bottom of the page;

- numbers for modules below others (`left2`, `right2`, etc.)

There's no limit to the number of modules that can be specified in a theme.

### 3.3. moduletitle

This tag displays the title of a module.

Attributes:

- `location` (required): the name of the module location;

- `pre`: a text to be added before the date. It won't be added if the title is not shown;

- `post`: a text to be added after the date. It won't be added if the title is not shown.

### 3.4. adminmenu

This tag inserts a menu to access some specific MeshCMS functions when the user has logged in:

- Control Panel: a link to the Control Panel;

- Edit this page: a link to edit the current page visually;

- Edit source: a link to edit the source of the current page;

- Clean HTML: a link to edit the source of the current page after having it cleaned with jTidy, that tries to convert any page into well-formed XHTML;

- New page: a link to create a new page at the same level of the current one;

- New child page: a link to create a new child page.

Some links won't appear if they are not appropriate. If no user has logged in, the behavior depends on the mode attribute. You should always use this tag in a theme, since it offers the most comfortable way to edit pages.

Attributes:

- `mode`: what to display before a user has logged in. There are 2 possible values: `normal` (default) displays a link to the login page and `hidden` shows nothing.

- `separator`: the text between elements (default is a space);

- `style`: a css style for links (default is no style).

Example 7.7. A vertical admin menu

    <mesh:adminmenu separator="<br />" />

### 3.5. mailform

Creates a standard form to send e-mail messages. This can be used to receive a feedback from visitors. The form will only appear in pages that have a recipient specified (it can be set when editing the page). This tag has no attributes.

Starting from MeshCMS 3.0, the same functionality can be achieved by using the mail module and specifying the e-mail address as argument, so it's up to the theme designer to decide if it is worth to use this tag.

### 3.6. feed

Creates a standard RSS feed tag. It must be used in the page head.

The RSS feed can display an image for each page in the feed: those images must be in the same folder of their pages and their name must be in the required format, i.e. `index_image.jpg` for `index.html` or `page_image.jpg` for `page.html`.

Attributes:

- `root`: the root path from which pages are included in the feed (defaults to the path of the current page);

- `maxItems`: maximum number of items to include in the feed;

- `pathRegex`: a regular expression to exclude the feed from some pages: if this expression is set, the feed tag will be included only in pages whose path matches the expression.

Prev | Up | Next
2. Page Design Tags | Home | 4. Navigation Tags