LassoScript Utility
Basics Browse Detail

[Lasso_TagExists]

Tag Link [Lasso_TagExists] Category Tags
Type Substitution Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
Output Type Boolean Security None
Implementation Internal Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x

Description

[Lasso_TagExists] returns True if the specified tag is currently defined or False otherwise.

Note: [Lasso_TagExists] will not return True for internal tags such as those listed below. These tags are implemented directly in the Lasso parser for better performance.

The internal tags include: [Abort], [Define_Tag] ... [/Define_Tag], [Define_Type] ... [/Define_Type], [Encode_Set] ... [/Encode_Set], [Fail], [Fail_If], [False], [Handle] ... [/Handle], [Handle_Error] ... [/Handle_Error], [If] ... [Else] ... [/If], [Iterate] ... [/Iterate], [Lasso_Abort], [Loop] ... [/Loop], [Loop_Abort], [Loop_Count], [NoProcess], [Params], [Protect] ... [/Protect], [Return], [Run_Children], [Select] ... [Case] ... [/Select], [Self], [True], and [While] ... [/While].

Syntax

[Lasso_TagExists: 'Tag Name']

Parameters

Required Parameters
Tag Name The name of the tag to be checked.

Change Notes

[Lasso_TagExists] will not return True for internal tags.

Examples

To check whether a tag exists before calling it:

Use the [Lasso_TagExists] tag to check that the tag exists. The following example checks that the [NSLookup] tag is defined before calling it.

[If: (Lasso_TagExists: 'NSLookup')]
  [NSLookup: 'www.example.com']
[/If]

127.0.0.1