Thank you for your feedback
Please let us know how this article can be improved.
Choose all that apply.*
Report a bad link
Out of date (instructions or screenshots)
Missing detail
Other
Please note that Turbify does not provide assistance for use of RTML, or use of custom templates. For more information about RTML, see our What is RTML? help article.
RTML Operator | Description |
< | Returns true if the first argument is less than the second. Both must be numbers. |
<= | Returns true if the first argument is less than or equal to the second. Both must be numbers. |
<=> | Returns -1 if first argument is less than second, 0 if they are equal, or +1 if first is greater than second. |
> | Returns true if the first argument is greater than the second. Both must be numbers. |
>= | Returns true if the first argument is greater than or equal to the second. Both must be numbers. |
ACCUMULATE | Sets result_var to result_init. Then, for ever y element in the sequence, sets iter_var to the current element, and updates result_var with the result of evaluating the body. Returns the result_var after all elements have been evaluated. |
ACTION | Returns a url that will perform a certain action. The possible arguments are :email, :help, :request, :search, and :show-order. |
AND | Takes any number of arguments. If all return true, returns the value of the last. |
APPEND | Every element in the body must evaluate to a list. Returns the result of appending all lists into one list. |
AS-LIST | Inserts begin and end list tags into the current page, either ol or ul depending on whether type is :ordered or :unordered respectively. See item. |
BASKET | Displays the visitor's shopping basket. |
BLUE | Returns a number between 0 and 255 representing the blue component of a color. |
BODY | Inserts HTML begin and end body tags into the current page. The arguments correspond to those of the tag. |
CALL | Calls another template, returning whatever value it returns, and inserting its output into the current page. |
CAPS | Takes a string and returns another string with the same letters in all caps. |
CENTER | Inserts html begin and end center tags. |
CMP | Returns -1 if first argument is less than second, 0 if they are equal, or +1 if first is greater than second. Uses <=> for numbers, STRCMP for strings, and STRCASECMP for IDs. |
COLOGO | Returns an image representing the logo of the company providing this software, height pixels high. |
COLOR |
Returns the color whose red, green and blue components are red, green, and blue respectively. COLOR red 255 returns the color bright yellow. |
COMMENT | Inserts an HTML comment tag into the current page, containing the string given as the text. |
ELEMENT |
Returns the element that occurs at position position in the sequence sequence. (Strings and lists are sequences.) ELEMENT position 1 returns the character b. |
ELEMENTS |
Returns a subsequence of the same type as sequence, consisting of its first through last elements. For example, ELEMENTS sequence "abcde" returns the string "bcd". |
EQUALS | Returns true if the first argument is the same as the second. Numbers are the same if their difference is zero. Symbols are the same if they are identical. Sequences are the same if each of their elements are the same. |
EVEN | Returns true if its argument is an even integer. |
FIND-ALL | Returns a list of all matching elements for which the body evaluates to true. |
FIND-ONE | Evaluates the expressions within the find-one expression with variable set to successive elements of sequence until the last expression returns true, whereupon that element is returned. Returns nil if no element causes the expressions to return true. |
FONT | Inserts HTML begin and end font tags into the current page. The arguments are the corresponding options to the font tag. |
FONT-WIDTH | Returns a number indicating how wide font is relative to Helvetica Bold. |
FOR | Used for iteration: variable is initially set to initial. Then test (presumably an RTML expression referring to variable) is evaluated. If it returns true, iteration stops. Otherwise the expressions within the for expression are evaluated in order, then variable is set to update (which can refer to variable), the test is evaluated, and so on. For example, to print the numbers from 1 to 10 on the current page, you would say: FOR variable x Note: For "update," the whitespace as shown in the example above is important to include (i.e. "update x + 1" and |
FOR-EACH | Evaluates the expressions within the for-each expression with variable set to successive elements of sequence. Returns a sequence of the same type, whose elements are the values returned by the last expression on each iteration. For example, FOR-EACH variable x generates the output: a |
FOR-EACH-BUT | Like for-each, but also evaluates last for every element of sequence except the last. |
FOR-EACH-OBJECT | Takes a list of IDs of objects. (The contents field of an item or section is always such a list.) For each one, the expressions within the for-each are evaluated in order, with that object as the current object. For example, FOR-EACH-OBJECT @contents will print the contents of the names fields of all the objects contained in this one. |
FORM | Inserts HTML begin and end form tags into the current page. The destination will be the action of the form. |
FUSE | Joins images (see render) on the axis specified by axis, aligned according to align. The component images with be spacing pixels apart, with the background-color showing through the gaps. The destination is currently ignored. Can also be used to add a border around an image, by supplying just a background-color and margins. |
GET-ALL-PATHS-TO | Returns a list of all paths (through @contents) between src and dst. If nodst is non-nil, omits dst; if nosrc is non-nil, omits src. |
GET-PATH-TO | Returns a list of IDs describing a path (through @contents) between src and dst. If nodst is non-nil, omits dst; if nosrc is non-nil, omits src. |
GRAB | Within a grab, what would be written to the current page is written to a string, which is returned. |
GRAYSCALE | Takes a color and returns a number between 0 (black) and 255 (white) representing the equivalent grayscale color. |
GREEN | Returns a number between 0 and 255 representing the green component of a color. |
HEAD | Inserts HTML begin and end head tags into the current page. |
HEIGHT | Returns a number representing the height of its argument, which should be an image. |
HEX-ENCODE | Returns a string of 2-digit hex numbers representing the ascii numbers of the characters in a string. |
HRULE | Inserts an HTML hr tag into the current page. The arguments correspond to the options of the hr tag. |
IF | The test expression is evaluated. If it returns true, the then expression is evaluated and its value is returned. Otherwise the else expression is evaluated and its value is returned. |
IMAGE | Inserts source, which must be an image into the current page. (Images are created by render and fuse.) The remaining arguments correspond to the options in the html img tag. |
IMAGE-REF | Returns a url that will point to image alone. |
INDEXED-SORT | First, iterates across sequence setting var1 for each element and evaluating getindex (the value to sort by). Then, sorts elements by setting var1 and var2 to two indices, to compare and evaluate the body in order to determine which is less than the other. Useful when "expensive" lookups must be performed against each element in sequence to determine the index to sort on. |
INPUT | Inserts an HTML input tag into the current page. The arguments correspond to the tag options. |
ITEM | Inserts an HTML li tag in the current page. |
LENGTH | Returns a number representing the number of elements in sequence, which should be either a list or a string. |
LINEBREAK | Inserts number HTML br tags into the current page. The clear argument corresponds to the clear option of the br tag. |
LINES | Takes a string and returns a list of substrings representing each line of text in the original. |
LOCAL-LOGO | Obsolete. Use cologo instead. |
LOWERCASE | Takes a string and returns another string with the same letters in all lowercase. |
MAXIMUM | Returns the maximum of its arguments. |
MAXNUM | The maximum number in our system. Useful for use with ACCUMULATE. |
META | Inserts an HTML meta tag into the current page. The arguments generate the corresponding options. Should only be called within a head expression. |
MINIMUM | Returns the minimum of its arguments. |
MINNUM | The minimum number in our system. Useful for use with ACCUMULATE. |
MULTI | Used to clump several expressions together. The expressions within it are evaluated and the value of the last is returned. |
NAMED-PROP | Returns the value of the property name or default-value if no such property exists. This is similar to the @propname syntax, but name is evaluated before the property is looked up. The NAMED-PROP RTML operator only has the option for default-value in Store Editor v.2. The additional options for value of the property name became available with Store Editor v.3. |
NOBREAK | Inserts HTML begin and end nobr tags into the current page. |
NONEMPTY | Returns true if string contains at least one non-whitespace character. |
NOT | Returns true if its argument is false, and vice versa. |
NUMBER | Inserts a representation of value into the current page, with digits digits after the decimal point. Uses for space characters if nb is T (default). |
OBJID-FROM-STRING | Given a string, checks to see if an object exists with the same name. If so, returns the ID. |
OR | Returns true if any one of the expressions within it returns true. (None of the expressions after that are evaluated.) |
ORDER | Returns a url that will order the object whose ID is object. |
ORDER-FORM | Inserts the shopping basket into the current page. |
PARAGRAPH | Inserts an HTML p tag into the current page. The align argument becomes the align option of the tag. |
PARAGRAPHS | Takes a string and returns a list of substrings representing each paragraph of text in the original. Paragraphs are blocks of text separated by blank lines. |
PAT-SUBST | Given a string "s", uses PERL-compatible regular expressions to replace frompat with topat. |
POSITION | Returns a number representing the position of element in sequence, or nil if it does not occur there. |
PRICE | Returns a string representing number as a price in the local currency. If supplied, currency overrides the local currency symbol. |
RED | Returns a number between 0 and 255 representing the red component of a color. |
RENDER | Creates an image. Usually used in one of two ways: to make an image from a file supplied by the user, or to render text as a gif. To make an image from a file supplied by a user, supply an image argument of type image. (The image To render text as a gif, supply a string as the text argument. You will probably also want to supply a font, |
RETURN-WITH | Returns value immediately as the value of the call to the current template. |
SEARCH-FORM | Inserts a size-character wide search form into the current page. The form will be labelled label, and the search button will read button. |
SEGMENTS | Returns a sequence of successive length-element long subsequences of sequence. If the length of sequence is not a multiple of length, the last subsequence will be short. |
SELECT | Inserts an HTML select tag into the current page. The options will be the elements of the list options, with selected as the selected one. |
SHIM | Inserts a transparent image that is height high and width wide into the current document. The align argument corresponds to the align option of the HTML img tag. |
SHOPPING-BANNER | Inserts the shopping basket banner into the current page. Should be used only in .of files. |
SORT | Returns sorted sequence by setting var1 and var2 and evaluating the body. |
STRCASECMP | Returns -1 if first argument is lexigraphically less than second, 0 if they are equal, or +1 if first is greater than second (not case-sensitive). |
STRCMP | Returns -1 if first argument is lexigraphically less than second, 0 if they are equal, or +1 if first is greater than second (case sensitive). |
SWITCH | Expressions within a switch expression are interpreted as alternating key-expression pairs. When a switch expression is evaluated, the value of value is matched against the keys, the corresponding expression is evaluated, and its value returned. Returns nil if no key matches. |
TABLE | Inserts HTML begin and end table tags into the current page. The arguments correspond to the tag options. |
TABLE-CELL | Inserts HTML begin and end td tags into the current page. The arguments correspond to the tag options. |
TABLE-ROW | Inserts HTML begin and end tr tags into the current page. The arguments correspond to the tag options. |
TAG-WHEN | Evaluates its body. If test is true, does so within tags indicated by tag. |
TEXT | Prints its argument on the current page. |
TEXT-STYLE | Inserts begin and end tags for one of the HTML text styles into the current page. The style can be :bold, :italic, :typewriter, :underline, :strike, :big, :small, :subscript, :superscript, or :blinking. |
TEXTAREA | Corresponds to the HTML textarea tag. |
TITLE | Inserts HTML begin and end title tags into the current page, with text as the title. Should only be called within head. |
TO | Returns a url that leads to the page of the object whose ID is id. The id can be a symbol, or one of the variables id, up, prev, and next, which depend on the current context. |
TOKENS | Takes a string and returns a list of substrings representing each token in the original. Tokens are groups of characters separated by whitespace. |
VALUE | Intended for lookups more complex than @. Currently the only possible value for query is :local, which returns true or false depending on whether the object whose ID is id has a local property prop. |
WHEN | If test returns true, the expressions within the when are evaluated and the value of the last is returned. Otherwise returns nil. |
WHOLE-CONTENTS | Returns a list of the IDs of all unexiled objects, in some attempt at alphabetical order based on names. |
WIDTH | Returns a number representing the width of its argument, which should be an image returned by render. |
WITH-LINK | Inserts HTML begin and end a tags into the current page, with destination as the href. |
WITH-OBJECT | The expressions within the with-object will be evaluated in order with the object whose ID is object as the current object. |
WITH= | The expressions within the with= expression will be evaluated with variable set to value. |
WORDBREAK | Inserts an HTML wbr tag into the current page. |
YANK | Returns a copy of sequence with all instances of element removed. |
See Also: