<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
If you have a zope product you can do something like this indeed : <br>
<br>
<tt>class MyContainer(Folder):<br>
&nbsp;&nbsp; """My Folderish Product"""<br>
<br>
&nbsp;&nbsp; def mydoc_xls(self, REQUEST=None):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """My new xls method"""<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return "My new xls method"<br>
<br>
&nbsp;&nbsp; def __getitem__(self, key):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """Check for mydoc.xls, then return mydoc_xls"""<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if key == 'mydoc.xls':<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return self.mydoc_xls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return super(Folder, self).__getitem__(key)</tt><br>
<br>
<br>
<br>
<blockquote
 cite="mid:faf6c7e50803252008y29df4189s9ce23c1ffcc6a002@mail.gmail.com"
 type="cite">Hi!<br>
Hey, Tres, could you point us to a web example or a web page with more
information about that technique?<br>
I'm very interested on it and the technique that was introduced
sometime ago about how to return a string as __bobo_traverse__ response
but the example was uncompleted (for me at least)<br>
  <br>
This kind of information was very useful for many of us but there are
no good tutorial or how-to<br>
  <br>
Thanks a lot!<br>
  <br>
  <div><span class="gmail_quote">2008/3/26, Tres Seaver &lt;<a
 moz-do-not-send="true" href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>&gt;:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-----BEGIN
PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
    <br>
    <br>
Martijn Jacobs wrote:<br>
&gt; Maybe a simple solution&nbsp;&nbsp;:<br>
&gt;<br>
&gt; Do you use apache as a frontend for your zope? If you do you can
rewrite<br>
&gt; the incoming url's for example like this :<br>
&gt;<br>
&gt; RewriteEngine On<br>
&gt; RewriteRule ^/folder/mydoc.xls(.*)<br>
&gt; <a moz-do-not-send="true"
 href="http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1">http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1</a><br>
&gt; [L,P]<br>
    <br>
    <br>
Or add a '__getitem__' to your class that looks for that key and returns<br>
the right method.<br>
    <br>
    <br>
Tres.<br>
- --<br>
===================================================================<br>
Tres Seaver&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+1 540-429-0999&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a moz-do-not-send="true"
 href="mailto:tseaver@palladion.com">tseaver@palladion.com</a><br>
Palladion Software&nbsp;&nbsp; "Excellence by Design"&nbsp;&nbsp;&nbsp;&nbsp;<a moz-do-not-send="true"
 href="http://palladion.com">http://palladion.com</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a moz-do-not-send="true"
 href="http://enigmail.mozdev.org">http://enigmail.mozdev.org</a><br>
    <br>
iD8DBQFH6ZfK+gerLs4ltQ4RAgdjAJ9bwmIjAbqkG1YKUyrgbKSG47FlXgCdHW+P<br>
GzL6mjcA1K8t9Q/5Y75tfF4=<br>
=mySN<br>
-----END PGP SIGNATURE-----<br>
    <br>
    <br>
_______________________________________________<br>
Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a moz-do-not-send="true" href="mailto:Zope@zope.org">Zope@zope.org</a><br>
    <a moz-do-not-send="true"
 href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>
**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>
(Related lists -<br>
&nbsp;&nbsp;<a moz-do-not-send="true"
 href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
&nbsp;&nbsp;<a moz-do-not-send="true"
 href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a>
)<br>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Mis Cosas<br>
  <a moz-do-not-send="true" href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a><br>
Zope Smart Manager<br>
  <a moz-do-not-send="true" href="http://blogs.sistes.net/Garito/670">http://blogs.sistes.net/Garito/670</a>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Zope maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
**   No cross posts or HTML encoding!  **
(Related lists - 
 <a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
 <a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 091621370000 | btw: 8161.22.234.B01
e-mail: <a class="moz-txt-link-abbreviated" href="mailto:martijn@fourdigits.nl">martijn@fourdigits.nl</a> | web: <a class="moz-txt-link-freetext" href="http://www.fourdigits.nl">http://www.fourdigits.nl</a>
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 
</pre>
</body>
</html>