Functions

Functions

Defining functions

The following file is evaluated: !extensions.gte

Variable set in extension are globally available

The value of @GlobalExtensionVariable should be I am set and I am global.

Calling functions

Without arguments

RazorGotemplate
@ChristmasTree(){{ ChristmasTree }}

Result

                       ✾
                      ✾✾✾
                     ✾✾✾✾✾
                    ✾✾✾✾✾✾✾
                   ✾✾✾✾✾✾✾✾✾
                  ✾✾✾✾✾✾✾✾✾✾✾
                 ✾✾✾✾✾✾✾✾✾✾✾✾✾
                ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
               ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
              ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
             ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
            ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
           ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
          ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
         ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
        ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
       ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
      ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
     ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾
    ✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾✾

With arguments (colors not shown)

RazorGotemplate
@ChristmasTree(5, "Red", "Green", "a"){{ ChristmasTree 5 "Red" "Green" "a" }}

Result (small)

        a
       aaa
      aaaaa
     aaaaaaa  
    aaaaaaaaa