[Zope] Generating non-existent documents on the fly?

Thomas B. Passin tpassin@mitretek.org
Tue, 26 Oct 1999 14:36:27 -0400


The best bet is for the web page, in the browser, to figure out what template
and data it wants.  You could use javascript for this.  The page then asks the
server for the template, and passes the specific data it wants like a form does.
The Zope server loads a set of variables from the form data.  The template is
written to write those variables into the page where you want them (as in
<!--#var var1--> would insert var1, and so on). Of course, a variable could
actually be a fairly lengthy string (best to use POST instead of GET for these)

Also, the "some_text" things could be stored as  DTML documents. The standard
headers and footers work this way, for example.  The template would contain
<!--#var some_text--> where you want to write it.

I notice that several people have asked similar questions recently.  You can do
a lot on in the browser using javascript, and the javascript could even be
written dynamically by Zope.  If you can do it in the browser, it is usually
better, since it reduces the burden on the server.  Let the server do good
server-like things, like retrieving query results from a database or formatting
pages or calling custom code.  And let the web page handle user interactions and
the related logic without bothering the server.

Thomas Passin

From: Stefan Hoffmeister <Stefan.Hoffmeister@Econos.de>

>
>Is there a way to generate non-existent documents on the fly - some kind
>of "rewriting" the target URL?
>
>Example site structure
>
>  /root (http://localhost/)
>     /content
>        layout_template
>        some_txt
>
>A user queries
>
>  http://localhost/content/some.html
>
>Obviously, "some.html" does not exist. This is where some mechanism (the
>one I am trying to find <g>) kicks in. It will analyze the query string,
>detect that there is "some_txt" and "layout_template". Based on that it
>will generate "some.html" on the fly.
>
>Any ideas?
>
>I'd rather not want to have question marks in the query; my attempts to
>play with standard_error_handler unfortunately did not yield anything.
>
>Thanks!
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(Related lists - please, no cross posts or HTML encoding!
>
>To receive general Zope announcements, see:
>http://www.zope.org/mailman/listinfo/zope-announce
>
>For developer-specific issues, zope-dev@zope.org -
>http://www.zope.org/mailman/listinfo/zope-dev )