A.1. Standard Parsing
Under normal circumstances, the template page containing tags and HTML is parsed in the following order:
- Any content in MV_AUTOLOAD is prepended to the template page.
- Any [pragma] tags anywhere in the text are processed, and the specified pragmas are set.
- Since [pragma] tags are preprocessed before any other content, reparse will not catch them, nor will they work if included in variables. Also, the specified pragma will apply to the entire template (not just the section after the tag).
- If you want to apply a pragma with a variable or only to part of a document, you must use [tag pragma="..."] instead.
- Variables (macros) are processed in the following order:
- @@VARNAME@@ global variables
- @_VARNAME_@ local or global variables
- __VARNAME__ local variables
- Interchange comments are stripped.
- False-endtag macros are expanded (e.g., [/page] and [/order]).
- '<!--[tagname]-->' escapes are converted to [tagname]
- This can be a convenience for your HTML editor if it has trouble with tags using the standard [tagname] syntax.
- However, if you want to HTML-comment out an Interchange tag in content that will be fed raw to a browser, you must include whitespace between the HTML comment delimiters and the tag, like this, '<!-- [tagname] -->'.
- The main tag parser is called.
- Some tags (e.g., [loop]) process PREFIX-tags in their contained body text. Hence, the PREFIX-tags are not handled recursively.
- Some tags are interpreted in the lib/Vend/Parse.pm:start routine. You cannot call them with the '$Tag->tagname()' syntax. They are:
- The [bounce] tag.
- Image paths substitution on the HTML output occurs.