How would this (or does this) translate to SSJS? This would be part of the HTML body of a landing page.
%%[IF @var > 1 THEN]%%
Show this content
%%[ELSE]%%
Show that content
%%[ENDIF]%%
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communitySomething like this:
<script type="text/javascript" runat="server">
Platform.Load("core", "1.1.1");
var var1 = Variable.GetValue("@var"); // or whatever
if (var1 > 1) {
Write("Show this content");
} else {
Write("Show that content");
}
</script>
I have an example here that shows a mixture of AMPScript and SSJS.
Also this official documentation is helpful: Server-Side JavaScript