![]() |
| > Home > Documentation > Latest documentation > Universal tag attributes |
|
Universal tag attributesUniversal attributes apply to all tags, though each tag specifies its own default for the attribute. The code implementing universal attributes is external to the core routines that implement specific tags. hideIf this attribute is set true then the tag's output will be suppressed. For example:
The above would return the value of the SQLDSN variable because hide and reparse both default true for the [calcn] tag. Second example:
The above will produce no output at all. Clearly the second example doesn't look very useful, but it stands as a graphic example of the feature. The hide parameter is more useful in tags like [value].
interpolateThis attribute behaves differently depending upon whether the tag is a container or standalone tag. A container tag is one which has an end tag. For example:
A standalone tag has no end tag. For example:
For container tags (interpolated):
For standalone tags (reparsed):
Assuming that the value of "name" is "Kevin", consider the following interpolation examples:
The first line would log "Kevin was here", whereas the second line would log "[value name] was here". Reparsing example: Suppose, on Sunday 29 January 2006, we set a scratchpad variable called "now", as follows:
A call to [scratch foo] using interpolate=0 (the default for [scratch]), would expand as follows:
and an interpolate=1 call would expand as follows:
Note that I used [tmpn] to set the scratchpad value, in the above example, because [tmpn] does not interpolate its body text by default. If I had used [tmp] or [seti] then the [time] tag in the body text would have been interpolated before the scratchpad value was set. reparseIf true (reparse=1) then the parser will process any further Interchange tags found in the text output from the tag, otherwise they will be returned as plain text. Reparse applies only to container tags (those with an end tag). The interpolate attribute controls reparsing of the output of standalone tags. The exception to this is the [include] tag, which reparses its output by default. Most container tags will have their output re-parsed for more Interchange tags by default. If you wish to inhibit this behaviour, you must explicitly set the "reparse=0" attribute. Note that you will almost always want the default action. The only container tag that doesn't have reparse set by default is [mvasp]. Example: Assuming that "name" is "Kevin":
The above would create the following output:
|
| Home | Legal nonsense | Privacy policy | Contact us |