Lasso Soft Inc. > Home

[Local]

[Local] either defines a new local variable or returns the value of an existiing local variable.

This tag should only be called within the [Define_Tag] ... [/Define_Tags] tags that surround a custom tag definition. The value of the local variable will only be available within the custom tag definition. Local variables will not conflict with page variables of the same name or with local variables of the same name in different custom tag definitions.

  • Syntax
  • Parameters
[Define_Tag]
  [Local: 'Local Variable Name', Encoding Keyword]
[/Define_Tag]

[Define_Tag]
  [Local: 'Local Variable Name'='Local Variable Value']
[/Define_Tag]
Optional Parameters
Variable Name The name of the variable for which the current value should be returned.
Variable Name and Value A variable with the specified name is created and set to the specified value.
Encoding Keyword Only affects the value of a variable which is returned, not the value of a variable which is set.
Examples

To define a local variable within a custom tag definition:

Use the [Local] tag. The following custom tag definition includes a local variable named PrivateValue. The local variable is set to the current date and then its value is returned.

[Define_Tag: 'Example']
  [Local: 'PrivateValue'=(Server_Date: -Extended)]
  [Return: (Local: 'PrivateValue')]
[/Define_Tag]
Result:
2001-09-20
Tag Link [Local] Category Custom Tag
Type Substitution Data Source Any
Support Preferred Version 5.0
Output Type Any 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