Created
October 26, 2011 18:34
-
-
Save mhulse/1317308 to your computer and use it in GitHub Desktop.
Super simple/silly way of separating logic from template using Caché objectscript...
This file contains hidden or 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
| Hey #(foo)# #(bar)#! | |
| <csp:comment> | |
| Output: Hey foo bar! | |
| </csp:comment> |
This file contains hidden or 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
| <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