Making the move...
ambassador at fourthworld.com
Mon Mar 27 13:44:55 EST 2006
Dan Shafer wrote:
> In any case, what is clearly NOT happening with an SSI is the inclusion of
> Transcript commands or functions directly in the HTML file from which the
> dynamic page is generated. All of the Transcript code is external to the
> page layout/template. The overly simplistic example I provided earlier of
> using an embedded call to a built-in Ruby function such as Time.now() is the
> key idea here. The call to that function generates NO HTML code, just a
> value to be substituted into the HTML page when it's generated by the
> server. Using CGI, you can't mix HTML and operational code *in the HTML
> template or page*. This means in general that the CGI must generate HTML
> blocks to be inserted into the HTML page at generation time on the server.
Just as Ruby is used to pre-process pages containing statements like
time.now, you can use Rev as the preprocessor with its merge function to
do the same thing:
The time is [[the time]]
The merge function is very powerful, well worth spending some time with
if you want to use Rev like Ruby or PHP.
The key thing to keep in mind when implementing a system like this is
that Ruby is just a text processing engine. The methods by which it's
hooked into the server are not unique to that engine, and just about any
capable text processing engine, such as Rev, can be set up to be used in
the same way.
Managing Editor, revJournal
Rev tips, tutorials and more: http://www.revJournal.com
More information about the Use-livecode