Simon User Guide
Report Templates
The Report Templates folder contains HTML (and other format) files to allow customizing the appearance and content of Simon reports. This folder is located within the Simon data folder, at "~/Library/Application Support/Dejal/Simon/". You can get to it quickly via the Reveal in Finder button in the Report Options section of the New / Edit Report window.
You don't need to edit the templates (or even look at them) to use Simon. Simon comes with a number of useful templates, which will be automatically installed in the Report Templates folder when Simon 2.1 or later is first launched. The Simon website also hosts updated and user-contributed templates: check out the Simon Extras page. However, if you wish, you can tweak the provided templates to suit your requirements, or even create new ones. If you create or modify a template and think others may find it useful, please contribute it: check out the Simon Extras web page for instructions.
The Report Templates folder contains sub-folders for each template. Within each of those folders are some or all of the following items:
- A file named index or summary, with any extension. This file contains the HTML for the Summary page, listing all tests included in the report.
- A file or folder named detail. If a file, it may have any extension; if a folder, it must have a file named index within it, again with any extension. In either case, this file has the HTML for the Detail pages. The detail file or folder is copied for each Detail page, using a short form of each test name.
- An images folder. This is optional; if present, it and its contents are output as-is. A perfect place for graphics files.
- A resources folder. This is also optional, and is also output as-is if present. A handy place for other files, e.g. cascading style sheet (CSS) files, extra PHP scripts, form pages, etc.
- Any other files will be ignored, so feel free to include read-me files etc in the template folders.
Most templates use HTML formatting, but this isn't a requirement. Any text-based format can be used. For example, the built-in templates demonstrate using XML for a RSS feed, and tab-delimited text.
In addition, the template files employ special Simon-specific tags, which are replaced with the tests, checks, changes, failures, and notifications of Simon, plus other values. These tags use much the same conventions as regular HTML, but with distinctive delimiters. There are two main kinds of tags - block and variable:
Block tags:
- Denoted with square brackets, e.g. [test].
- Have matching closing tags, e.g. [/test], just like HTML.
- Act as a scope for enclosed variables.
- Encompass HTML that should be repeated for each line, e.g. for each test on a Summary page or each Check on a Detail page.
- Can have parameters; currently the only one supported is count, to limit the number of lines used.
Variable tags:
- Denoted with curly braces, without a separate closing tag, e.g. {name}.
- Have a variable name, and optionally include parameters, e.g. {date type="absolute"}.
- Parameter values must be enclosed in double quotes.
- There must not be any spaces between the parameter name, the equals sign, the quotes, and the value.
- Multiple parameters can be used, or omitted to use the default values.
Block and variable tags and their parameters are not case sensitive, so feel free to use MixedCase to make them more readable if you wish.
The Summary page has two block scopes - the document itself, and the test block. Click for more information on variables for each kind of block:
- Document: The HTML document supports several variables that can be used anywhere in the document.
- Test: Encloses the template for a single test; this is repeated for each test included in the Summary.
The Detail pages support several kinds of blocks:
- Document: As for the Summary page, the Detail pages also supports document-level variables.
- Test: In this case, this block encloses information on the single test of the Detail page.
- Check: Encloses the template for a single check; this is repeated for each check.
- Change: Encloses the template for a single change; this is repeated for each change.
- Failure: Encloses the template for a single failure; this is repeated for each failure.
- Notification: Encloses the template for a single notification; this is repeated for each notification.
See the parameters page for information on the available parameters.
See the above pages for more information, and the provided templates for examples.
Return to the Report Options page
Return to the New / Edit Report window page
Return to the Reports window page
Go to the User Guide Contents
Return to the main Simon page