Skip to content

Instantly share code, notes, and snippets.

@Mumpitz
Last active July 9, 2020 04:35
Show Gist options
  • Save Mumpitz/8f3abea0fdf83104c35e7fbe2114110d to your computer and use it in GitHub Desktop.
Save Mumpitz/8f3abea0fdf83104c35e7fbe2114110d to your computer and use it in GitHub Desktop.
A simple Demo how to use the KudzuASP Template Engine - The ASP
<% @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
%>
@gapegito
Copy link

gapegito commented Jul 9, 2020

Hola como cva todo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment