Coding in Cascade

Cascade Code Sections

Cascade will try and do a basic evaluation of your code and it will attempt to 'resolve' issues it sees with it. This can be nice for HTML, but not so nice for Javascript or PHP. To get around this, there are some Code Passthrough options.

Protect

Protect will attempt to execute the code as you wrote it, even if Cascade would have detected abnormalities with it. This is useful for getting Javascript to render inside of Cascasde. If you neglect to close an HTML tag, your page will not render or publish.

<!--#protect<script type="text/javascript">alert("Hello World");</script>#protect-->  

Passthrough

Passthrough is useful for server side languages, where the output will not render in Cascade. Anything put in a passthrough tag will be skipped until published.

<!--#passthrough<?php echo "<Hello World>" ?>#passthrough-->

You can also use passthrough-top to get the code to get written at the top of the document, which can be helpful for ASP pages with code behind calls.

<!--#passthrough-top <?php echo "<Hello World>" ?> #passthrough-top-->  

For more information, see Hannon Hill's Code Sections Page.