Print If Set Conditionals

This page demonstrates Hashtag Print commands with If Set Conditionals.   A value containing only white-space will result in printing the else string.   Contexts can be applied to either string, or to Variables within the strings.  
Processing this Hashtag Markup:
<# print "<#[url.test as html]#>" if set else "No value set for <b>test</b> in the URL"; #>
No value set for test in the URL
Processing this Hashtag Markup:
<# print "<#[url.test]#>" as html if set else "No value set for <b>test</b> in the URL"; #>
No value set for test in the URL
Processing this Hashtag Markup:
<# 
// you might prefer this syntax...
// applying the html context to the else string escapes the <b> tags
print "<#[url.test as html]#>" if set 
	else "No value set for <b>test</b> in the URL" as html;
#>
No value set for <b>test</b> in the URL


The Hashtag Markup Language provides Contexts for reformatting Variable values.  

The examples in this section cover the many Contexts the Hashtag Framework supports to alter Variable values.