[Zope] Turn static HTML dynamic?
Jay, Dylan
djay@lucent.com
Tue, 12 Oct 1999 10:03:00 +1000
> -----Original Message-----
> From: User Webteam [mailto:webteam@uni-bielefeld.de]
> Sent: Monday, October 11, 1999 22:18
> To: zope@zope.org
> Subject: [Zope] Turn static HTML dynamic?
>
>
> Hi!
>
> We´re thinking about using Zope for our University website.
> Now we face
> following problem:
> We need a simple solution for people who don´t want to care about DTML
> to publish their documents using Composer or similar WYSIWYG tools.
> These documents should be rendered with some standard HTML-code
> (navigation and the like). Is there any possibility to do this without
> having to teach everyone <dtml-var> etc.? We tested various things
> (access rules) but in the best case we end up with nested <html> tags.
> Unfortunately, we have no python experts here and we´re not learning
> fast enough to present a solution within time.
>
> Some background info: we have to ensure that virtually erveryone here
> has a simple way to put information on the net. Most of these people
> have little or no HTML knowledge but use Composer, HotMetal
> or even word
> to create their documents. So it seems unacceptable to our bosses to
> bother anyone with manipulating sources. We would really like to use
> Zope because of its great management features, user management and
> expandibility (and its price ;-), so any hints would be highly
> appreciated.
Heres my idea for this.
Have a seperate ftp server running that uses different GET and PUT methods.
These methods will work differently from just presenting the straight DTML.
The GET method will do something like a rendering with the DTML encoded into
comment tags. So
<dtml-var standard_html_header>
<ul>
<dtml-in aList>
<li><dtml-var sequence-item></li>
</dtml-in>
</ul>
<dtml-var standard_html_footer>
Would be rendered like
<!--%dtml-begin-var standard_html_header-->
<html>
<title>A big Title</title>
<body>
<!--%dtml-end-var standard_html_header-->
<ul>
<!--%dtml-begin-in aList-->
<li><!--%dtml-begin-var sequence-item-->Item1<!--%dtml-end-var
sequence-item--></li>
<!--%dtml-next-in aList-->
<li><!--%dtml-begin-var sequence-item-->Item2<!--%dtml-end-var
sequence-item--></li>
<!--%dtml-end-in aList-->
<!--%dtml-begin-var standard_html_footer-->
</body>
</html>
<!--%dtml-end-var standard_html_footer-->
Not exactly clean but it would mean a WYSIWYG editor could edit the whole
page and as long as the comments were preserved then the everything would be
fine.
The PUT method would decode the above and turn it back into the orginal
DTML. Changes inside iterations might have to be merged somewhat. Changes to
server side includes could be propergated back to the included object as
long as the user has permission to change it. Changes to variables like
sequence-item can just be ignored. Changes to objects with which the user
has no permission can similarly be ignored.
Why go to all this trouble?
a) It lets wysiwyg people make changes to DTML code hopefully without
destroying it.
b) It lets DTML people do a bit a visual design once in awhile.
c) It lets beginers write content for a site that needs to have the standard
footer and header on each page and still see what it looks like. d) It will
allow Zope to do something no other server side scripting can do,
successfully combine scripting and wysiwyg editing.
e) It allows the use existing editors such as Homesite rather trying again
with javascript or java or whatever.
How can this be implemented? Having a quick look round the code, not easily.
I think the recursive way DTML is parsed and rendered makes it hard to put
extra steps between recursions.
Does everyone think this
a) Won't work very well
b) Isn't worth it
c) great idea but impossible to impliment.
d) fantastic idea, I'll have it done tonight
....?