Tridion Dreamweaver Template Delimiter Escaping

This was a question that popped up in the forums recently, so I thought I would share on how to escape Dreamweaver delimiters. That is, actually outputting “@@someValue@@” or “${someValue}” in your DWT’s without having them parsed.

The following samples will all escape the delimiters properly.

@@"@" + "@" + "test" + "@" + "@"@@
@@"$" + "{" + "test" + "}"@@
@@"@" + "@test@" + "@"@@
@@"$" + "{test}"@@

And will output:

@@test@@
${test}
@@test@@
${test}

As a side note, trying to escape the delimiters using the “${ }” delimiter will not work the same. The closest I got to actually displaying the correct output was by using ${"$" + "{" +"test}}. Yep, the odd number of quotes was needed… if you add the last quote (as it looks like it should need), it’ll actually output the last quote. Odd, no?

I hope that helps anyone who’s in need to do this sort of escaping from their DWT’s!