ePages 6.11.0 - DE_EPAGES/TLE/API/SetHandler.pm

Package DE_EPAGES::TLE::API::SetHandler

This tle handler extens the tle processor with local setted variables. This handler supports the following functions:

Example
#LOCAL("Counter", 1)
    #SET("Counter", #Counter + 1)
    #Counter == #GET("Counter")
#ENDLOCAL

Functions

GET
LOCAL
SET
_

GET

Returns the value of a TLE variable with the given name. This is useful if the name of the TLE variable is dynamic.

Syntax
#GET(#Name)
Example
#LOOP(#Product.Class.Attributes)
  #Alias = #Get("Product.".#Alias)
#ENDLOOP

LOCAL

Declares a TLE variable that is valid of a part of a template.

Syntax
#LOCAL(#Name, #Value) .. #ENDLOCAL
Example
#LOCAL("Counter", 0)
  #LOOP(#Products)
    #SET("Counter", #Counter + 1)
  #ENDLOOP
  Total: #Counter
#ENDLOCAL

SET

Sets the value of a TLE variable in the current template context.

Syntax
#SET(#Name, #Value)
Example
#SET("Counter", #Couter + 1)

_

Returns the TLE hash of the current context.

Syntax
#_
Example
#LOCAL("FoundObject", #UNDEF)
  #LOOP(#Objects)
    #IF(#Alias EQ #SearchAlias)
      #SET("FoundObject", #_)
    #ENDIF
  #ENDLOOP
  Found: #FoundObject.ID
#ENDLOCAL