Manage PHP Scripts in Cascade

Allie's Avatar


14 Jul, 2010 08:45 PM

Hi there,

We have a section of pages in Cascade that use a PHP script. Currently the script is stored in Cascade as a page using a template that contains just one line <system-region name="DEFAULT"/> in the default configuration. Every time when the page is loaded in Cascade, I get the following error in the server log: Could not convert JDOM document into string: Exception outputting Document: Root element not set.

The PHP script is called in the XSLT format for the DEFAULT region of those pages:
<div id="dynamic-content"><img src="/path-to-the-script-in-cascade-without-php-extension" /></div>

What's the best way to manage and use PHP scripts in Cascade without generating server errors? Can I manage them as files, not pages? What's the difference between the two?

Thanks much in advance!

  1. 1 Posted by Bradley Wagner on 14 Jul, 2010 09:46 PM

    Bradley Wagner's Avatar

    Is the script's content dynamically generated? This is the primary difference between page content and file content in Cascade. Page's content can also be indexed and included in other pages/blocks. Page's content must also be well-formed XML which can be a little tricky when embedding PHP. We have what are called code sections to do this in Cascade.

    If the PHP script is static and just needs to be published to your webserver, a file should suffice.

  2. 2 Posted by Allie on 14 Jul, 2010 09:59 PM

    Allie's Avatar

    Thanks much for this! It makes sense. The script is static and I will manage it as a file.

  3. Allie closed this discussion on 14 Jul, 2010 09:59 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac