Tag Link | [Define_Tag] ... | Category | Custom Tag |
---|---|---|---|
Type | Container | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | Internal | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
[Define_Tag] ... [/Define_Tag] defines a new custom Lasso tag. The body of the container tag defines the operations that will be performed each time this tag is called. The new tag can be called immediately after the closing [/Define_Tag].
If the second parameter is
Tags which are defined in format files placed in the LassoStartup folder upon startup can be used within any format file processed by Lasso.
[Define_Tag: 'Tag Name']
... Tag Body...
[/Define_Tag]
<?LassoScript
Define_Tag: 'Tag Name';
... Tag Body...
/Define_Tag;
?>
[Define_Tag: 'Tag Name',
... Tag Body...
[/Define_Tag]
Required Parameters | |
---|---|
Tag Name | The name of the tag to be defined. |
Optional Parameters | |
-Async | If specified then the tag will spawn a new thread and execute asynchronously. |
-Container | Specifies that the custom tag is a container tag. |
-RPC | Specifies that the custom tag should be made available as a remote procedure call through RPC.LassoApp. |
-Required | Names a required parameter for the tag. The parameter will be available as a local variable within the tag. |
-Optional | Names an optional parameter for the tag. If the parameter is specified it will be available as a local variable within the tag. |
-Criteria | The criteria specifies a condition which must be satisifed for the tag to run. The value is an expression which is run within the context of the tag and should return True or False. |
-Priority | The priority specifies whether a custom tag should replace a currently defined tag with the same name or should be placed before or after it in the calling order. Value should be Replace, High, or Low. |
-Type | Specify after a |
-ReturnType | Specifies a constraint on the type of the return value from the tag. |
-Description | An optional description for the tag. |
-Looping | Specifies that the tag is a looping container tag. The [Loop_Count] will be set automatically each time [Run_Children] is called. |
-Namespace | The namespace in which to install the tag. |
-Atomic | Specifies that the tag should run atomically. Only one instance of that tag will be allowed to run. Any other page loads or threads that call the tag will block until the first instance has finished running. |
-Copy | Specifies that the preceding |
-EncodeNone | Specifies that the return value of the tag should not be encoded by default. If this keyword is not specified then the return value will be HTML encoded by default. |
-Privileged | Specifies that the custom tag should run with the privileges of the current user rather than with the privileges of the user who ultimately calls the custom tag. |
-SOAP | Specifies that the tag should be made available to remote Web servers as a SOAP operation.The tag can then be accessed through RPC.LassoApp. The |
To define a custom tag to send an email to the system administrator:
Use the [Define_Tag] ... [/Define_Tag] tags to create a tag that calls the [Email_Send] tag. The following example sends an email with information about the current page to administrator@example.com.
[Define_Tag: 'Email_Administrator']
[Email_Send:
[/Define_Tag]