Incorporating Scripting Languages

NEWS & TIPS

  • Site Access Keys
  • Top: Alt+t
    Previous: Alt+,
    Next: Alt+.
    Up: Alt+;
    (Note: use Ctrl on the Mac)

Passthrough Code Sections

Author: Bradley Wagner

The first is the passthrough code section. It is delimited as follows:

When viewing a file or page containing these types of blocks within the CMS, these sections are left untouched unless the asset is a page with serialization type of PDF or RTF (as determined by the Target associated with the page's Template). If the serialization type is PDF or RTF the section is simply stripped from the code.

When publishing a file or page containing these blocks to a location outside the CMS, these sections are rewritten so that the enclosing comments and "#START-CODE"/"#END-CODE" strings are removed. However, when publishing a page with PDF or RTF serialization type, these sections are once again completely removed rather than rewritten.

For example, suppose we wanted to embed the following PHP code in a page:

Simply wrap it with the passthrough code comment tags:

This allows the page to validate as XML.

When viewing this page in the system, this code would remain inside of the comments untouched; and the PHP code will not render (unless one is looking at a PDF or RTF configuration of a page, in which case the comments and the code would be removed).

However, upon publishing to a file with serialization type of HTML or XML, the comment tags are stripped out leaving only the valid PHP code:

When publishing to a PDF or RTF file or viewing a PDF or RTF configuration of the page within the system, the comments and the code itself would all be stripped out.

Last modified on Thu, 30 Nov 2006 17:51:20 -0500

Topic Feedback Form

Content Rating:
Email:
Feedback:


Top / Previous / Next / Up / Table of Contents