Interchange Tags Reference ========================== ictags.1.118 (Draft) 1. Interchange Tag Reference ============================ Interchange functions are accessed via the Interchange Tag Language (ITL). The pages in a catalog may be mostly HTML, but they will use ITL tags to provide access to Interchange's functions. ITL is a superset of MML, or Minivend Markup Language. Minivend was the predecessor to Interchange. These tags perform various display and modification operations for the user session. There nearly 100 standard predefined tags, and the UserTag facility allows you to create tags that perform your own functions and can be just as powerful as the built-in tags. This document covers Interchange versions 4.7 through 4.9. 2. Tag Syntax ============= ITL tags are similar to HTML in syntax, in that they accept parameters or attributes and that there are both standalone and container tags. We will call an attribute a parameter if it may be called positionally or if it must be included (see the parameter and attribute sections below). A standalone tag has no ending element, e.g.: [value name] This tag will insert the user's name, providing they have given it to you in a form. A container tag has both a beginning and an ending element, as in: [if value name] You have a name. It is [value name]. [/if] 2.1. Standard Syntax -------------------- The most common syntax is to enclose the tag with its parameters and attributes in [square brackets]. If the tag has an end tag, the tag and its end tag will delimit contained body text: [tagname parameters attributes]Contained Body Text[/tagname] Caveat - macros: Some macros look like tags or end tags. For example, [/page] is a macro for . This allows you to conveniently write [page href]Target[/page], but 'Target' is not treated as contained body text. When using the [tagname ...] syntax, there must be no whitespace between the left bracket ('[') and the tagname. If a tag name includes an underscore or dash, as in [item_list], a dash is just as appropriate (i.e. [item-list]). The two forms are interchangeable, except that an ending tag must match the tag (i.e., don't use [item-list] list [/item_list]). 2.2. HTML-Comment ----------------- ITL also allows you to use '' as interchangeable alternatives to plain square brackets: [tagname] and are equivalent. This allows you make your raw tags appear as comments to HTML browsers or editors. You might want to do this if your editor has trouble with ITL tags when editing Interchange page templates, or alternatively, if you want to use one .html file both as an Interchange template and as a static page delivered directly by your web server, without Interchange processing. To properly HTML-comment contained body text, place your comment-style brackets appropriately, for example: Note that you must include whitespace between the HTML comment delimiters and the square brackets if you wish to actually comment out tag output in the browser. For example, if [value name] expands to 'Bill': '' becomes 'Bill' '' becomes '' 2.2.1. Technical notes ---------------------- While '' with ']' unless it also sees '