Skip to content

Instantly share code, notes, and snippets.

@mhulse
Created October 26, 2011 18:34
Show Gist options
  • Select an option

  • Save mhulse/1317308 to your computer and use it in GitHub Desktop.

Select an option

Save mhulse/1317308 to your computer and use it in GitHub Desktop.
Super simple/silly way of separating logic from template using Caché objectscript...
Hey #(foo)# #(bar)#!
<csp:comment>
Output: Hey foo bar!
</csp:comment>
<script language="cache" runat="server">
set foo = "foo"
set bar = "bar"
; Other logic here.
; Use kill for vars not needed on template.
try {
do ##class(%CSP.Page).Include("load.csp")
} catch(e) {
w "Sorry"
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment