Contemplate™ Web Templating System  


 

Latest release

Contemplate 2.0.2
16 Nov 2011
download now!


Featured site


Type A Learning Agency



How does Contemplate work?

The overall design of Contemplate was based on the idea of a "dynamic" server-side include. Normally, an include consists of a hard-coded reference to a file. Contemplate expands on this in two ways. First, the reference is not hard-coded, but is passed into the page through the URL string. Second, the reference can be not only to a file but also to a portion of a file, a randomly selected portion of a file, or the value of an HTML form. These two differences reverse the paradigm of server-side includes: instead of a site with many pages, each sharing the same piece of content, we can build sites with just a few templates, each displaying different pieces of content.

Each URL in a Contemplate site is actually a request for Contemplate's Assembler script, with an argument telling the script which template to use. Contemplate reads the template and looks for the special include tags, which we call "embed tags." Each URL also contains arguments telling the script which piece of content to display in the place of each embed tag. Contemplate reads the content files that contain these pieces of content, extracts the desired pieces from them, and merges the content into the template. The visitor then sees a complete web page.

Dynamic URL diagram

 
Contemplate is developed by Arlo Leach.