Lasso Soft Inc. > Home

[Define_Tag] ... [/Define_Tag]

[Define_Tag] ... [/Define_Tag] defines a new LDML 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 -Async then an asyncrhonous tag will be created. This tag cannot return results to the current format file. It is executed in a separate thread after the current format file is finished processing.

Tags which are defined in format files placed in the LassoStartup folder upon startup can be used within any format file processed by Lasso.

  • Syntax
  • Parameters
[Define_Tag: 'Tag Name']
  ... Tag Body...
[/Define_Tag]

<?LassoScript
  Define_Tag: 'Tag Name';
    ... Tag Body...
  /Define_Tag;
?>

[Define_Tag: 'Tag Name', -Async]
  ... 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 asyncrhonously.
Examples

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: -Host='mail.example.com',
    -To='administrator@example.com',
    -From='administrator@example.com',
    -Subject='Custom Tag',
    -Body=(Server_Date) + ' ' + (Server_Time) + ' ' + (Client_IP)]
[/Define_Tag]
Tag Link [Define_Tag] ... [/Define_Tag] Category Custom Tag
Type Container Data Source Any
Support Preferred Version 5.0
Output Type None Security Tag
Implementation Sets Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft