Server Side Includes and Cascade Server

Justin Rogers's Avatar

Justin Rogers

16 May, 2014 09:07 PM

Good afternoon,

We at the Florida Department of Health are currently looking into using server side includes for repeated content (navigation, header, footer, etc...) on our site -

Before we get started with the transition, we wanted to see if anyone has been down this road already and has any advice, best practices, or pitfalls to watch out for while using server side includes with Cascade Server.

Thanks in advance for any information or resources you can provide!

  1. 1 Posted by Wing Ming Chan on 17 May, 2014 12:52 PM

    Wing Ming Chan's Avatar

    Hi Justin,

    At Upstate, we do a lot of server side includes, using PHP. For example, our entire Find a Doctor system is in fact a huge file system, generated every day. Yet these files can be included in pages published from Cascade. See a faculty page and individual profile pages for examples (these included files are part of the Find a Doctor file system).

    One disadvantage of using PHP include is that the content is not visible inside Cascade. Lately I figured out a way to deal with this. See Blue Page and Clinic Entries for more details. Essentially, I use a data definition block with two block choosers: one for a text block, containing PHP code, the other for a feed block. Both the text block and feed block actually point to the same external file. The feed block makes the content visible inside Cascade, whereas the text block helps publish PHP code in the page. In this way, content from external files can be made available inside Cascade. There is a catch though: the content must be well-formed XML.

    Since external file paths can change over time, try not to hard-code paths in pages. Instead, use variables and constants. In templates I created, I actually embedded a PHP entry point (a PHP include pointing to an external file defining global environment variables, constants, etc.). I also use this external file to set up flags like intra, local, and so on, and detect site names and page names.


  2. Tim closed this discussion on 08 Oct, 2014 05:55 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