Last active
July 9, 2020 04:35
-
-
Save Mumpitz/8f3abea0fdf83104c35e7fbe2114110d to your computer and use it in GitHub Desktop.
A simple Demo how to use the KudzuASP Template Engine - The ASP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% @CodePage = 65001 %> | |
<% | |
Option Explicit | |
Response.Buffer = true | |
%> | |
<!--#include file="/path/to/_kudzu.asp"--> | |
<% | |
Set T_ENGINE = New CTemplateEngine | |
' set Paths | |
T_ENGINE.setLibPath("/path/to/library/folder/") | |
T_ENGINE.PathPrefix = "/path/to/template/folder/" | |
' include Libraries | |
T_ENGINE.libImport("iterate") | |
Dim varTitle, varValue1, varValue2, varCondition | |
varTitle = "KudzuASP Demo" | |
varValue1 = 4 | |
varValue2 = 17 | |
varCondition = CBool(varValue1 > varValue2) | |
T_ENGINE.PutValue "title", varTitle | |
T_ENGINE.PutValue "val1", varValue1 | |
T_ENGINE.PutValue "val2", varValue2 | |
T_ENGINE.PutValue "cond", varCondition | |
' specify template | |
T_ENGINE.ParseFile "path/to/template.html" | |
' write output | |
T_ENGINE.EvalTemplate | |
Set T_ENGINE = nothing | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hola como cva todo