4.33. goto

Skips page content between [goto name] and [label name]. Note that the goto tag is not interpreted in the standard way, and you cannot use the '$Tag->goto()' Perl syntax. Note also that skipping endtags with goto will probably break your page.

4.33.1. Summary

    [goto name=label_name if=condition]
        content to skip
    [label name=label_name]

or positionally,

    [goto name if]
        content to skip
    [label name]
Parameters Description Default
name The name set in the corresponding [label] tag none
if Condition for goto. Should evaluate to truth value before tag is parsed. true
Other_Characteristics  
Container tag No, but you use it like this:
    [goto name=label_name if=condition]
      body text

    [label label_name]
Has Subtags [label] interpreted by goto

ASP-like Perl call:

No Perl call available (Note that this tag is not parsed in the standard way).

4.33.2. Description

Skips page content between [goto name] and [label name]. Note that the goto tag is not interpreted in the standard way, and you cannot use the '$Tag->goto()' Perl syntax. Note also that skipping endtags with goto will probably break your page.

The correspondingly named [label] tag marks the end of the page content the goto should skip. Note that the [label] tag is not an end tag, but simply a marker for the end of the text to skip.


Technical note (Interchange 4.8): This tag may not work properly if you have more than one goto/label pair on a page.


4.33.2.1. name

This should match the name set in a [label] tag after the goto tag in the page (i.e., don't create loops).

4.33.2.2. if

Condition for goto. If the argument to 'if' is true, the tag will skip the text between the goto and <label>. Note that the tag itself does not evaluate the condition. The condition must evaluate to a true or false value before the goto tag processes it.

For example, this will not execute the goto:

    [set go]0[/set]
    [goto name="there" if="[scratch go]"]