[Zope] Many Zope questions

Michel Pelletier michel@digicool.com
Fri, 3 Sep 1999 14:21:02 -0400


> -----Original Message-----
> From: John Goerzen [mailto:jgoerzen@complete.org]
> Sent: Friday, September 03, 1999 12:45 PM
> To: zope@zope.org
> Subject: [Zope] Many Zope questions
> 
> 
> Hi,
> 
> I'm just new to Zope, and have some questions both on documentation
> and on overall architecture.
> 
> First, despite reading the descriptions in the documentation, I still
> don't understand the difference between a DTML Method and a DTML
> Document, save that documents (apparently?) have their own properties
> (variables?)  When should I use one, when should I use the other, etc?

Did you read the DTML Documents vs. DTML Methods How-To?

http://www.zope.org:18200/Members/michel/HowTos/DTMLMethodsandDocsHowTo

> Next question.  I'm wanting to take a site, say http://www.aclug.org/
> that I currently maintain with a set of m4 macros, and put it into
> Zope.  I'd like to do nice dynamic things like, say, have a Quick
> Links bar that is defined somewhere.  This could then be turned on or
> off by the user (probably by saving a cookie).  Also, maybe I'd like
> to use this Quick Links bar in other documents.  First, I 
> suspect that 
> I should then make an object with the Quick Links bar.  How do I
> import that object into documents later?  There was a 
> reference in the 
> DTML manual to an addDocument function, but I can't find any
> information on that function.
> 

There is no need to do anything complex like explicitly calling a
method.  Just include the link bar in your standard_html_header:

<dtml-var linkbar>

> Also, how do I go about doing the dynamic inclusion and cookie
> settings?  Specifically, how do I make a "click here to remove" thing
> that will set a cookie saying to not display that particular part?
> 

Use RESPONSE.setCookie

http://www.zope.org:18200/Documentation/Guides/DTML/DTML-HTML/DTML.4.5.h
tml#pgfId-1047078


> How do I do virtual hosting with Zope?  For instance, let's 
> say I have 
> 5 websites, each with different domain names, but hosted on the same
> machine.  Right now, I've got Zope's special server going (not using
> the Apache tie-in).  Do I need to use the Apache tie-in, and if so,
> does this have a negative impact on performance?
> 

Run five Zope instances through 5 Apache rewrite rules.  There are
unsupported patches to allow multiple zope processess to share the same
base of software, but I don't know about them.

> There are some things that just cannot easily be put into Zope.  For
> instance, I have software that creates a HTML tree for mailing list
> archives, and updates the tree each night.  With Apache, I 
> just set an 
> Alias so that these items can be easily seen.  How can I do this with
> Zope?  Is it even possible?

The easiest thing is to just keep the alias in place and 'short-circuit'
your Zope rewrite rule with a rule that sends the client to your other
content.  We do this with mailman:

http://www.zope.org/mailman/listinfo/zope

is not served by zope, but rather by Apache, with the following rule.

RewriteEngine On
RewriteLog logs/rewrite_log
RewriteLogLevel 0

RewriteRule ^/mailman - [l]

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/(.*) /usr/local/dc/zope19/zope19.cgi/$1
[e=HTTP_CGI_AUTHORIZATION:
%1,t=application/x-httpd-cgi,l] 

It would be a good thing if someone write a how-to on this.  Guess it'll
be me, here ya go:

http://www.zope.org:18200/Members/michel/HowTos/ApacheRewriting

> What sort of logs does the Zope server produce?  Can they be 
> formatted 
> to be like Apache's so standard web log analyzer software can parse
> them?
> 

I think chris patched zope to output common log format, but I'm not
sure.  Chris?

-Michel