[Zope] Zooming images

Rafael Cordones Marcos rcm@bcnartdirecte.com
Sun, 17 Oct 1999 19:21:17 +0200


Hi folks,

I am working on a web aplication in which users must read a total of
12 cases and for each of them they have to choose an answer from the
ones provided, i.e. multiple-choice test. I've followed the ZBook and
I am using a similar structure but with a 'Cases' folder and then
subfolders.

       ...
       /Cases (folder)
         index_html (DTML Doc)
         case (DTML Doc)
         /01 (folder)
           case_text (DTML Doc)
           Photos (folder) 
         ...
         /12 (folder)
           case_text (DTML Doc)
           Photos (folder)
       ...

The 'case' DTML document contains the formating and I will use it to
render the page of the case to view like:

      /.../Cases/01/case

'case' will call 'case_text'.

But there's a problem with this because the title appearing at the
browser is always that of the object 'case'. So I have to do it like:

       ...
       /Cases (folder)
         index_html (DTML Doc)
         case_header (DTML Doc)
         case_footer (DTML Doc)
         /01 (folder)
           case_text (DTML Doc)
           Photos (folder)
         ...
         /12 (folder)
           case_text (DTML Doc)
           Photos (folder)
       ...

And now when accessing 

      /.../Cases/01/case_text

'case_text' will contain:
-----------
<!--#var case_header -->

text contents go here ...

<!--#var case_footer -->
-----------

I liked the first way thogh. Was I doing something wrong?

The thing is this cases also contain photos. I would like users 
to be able to enlarge them. What is the 'Zope' way to do this? I mean,
do I have to have two Image objects, small and large? Maybe I could
make a function that given an Image object and a height and with
parameters would return an Image object with the small image. Anybody
knows of some code/docs where I could start?

Thanks for your time.

Rafa

-- 
Linux. The Choice of a GNU Generation! -> http://www.debian.org