Re[2]: [Zope-CMF] Default View for folderish classes and index_html

Rainer Thaden Rainer Thaden <thadi@gmx.de>
Wed, 19 Jun 2002 10:01:52 +0200


Dieter,


DM> Rainer Thaden writes:
DM>  > i built a class ('fold_class') derived from PortalFolder, PortalContent
DM>  > and DefaultDublinCoreImpl (in that order).
DM>  > 
DM>  > When I add an image to the instance ('inst') of the folderish class in
DM>  > .../temp/inst/img1 and provide some HTML-Code in an attribute of the
DM>  > class which references to the image like 'bla bla <img src='img1'>',
DM>  > everything is fine if I call the view method ('fold_class_view') from
DM>  > the actions box in the view of the class instance which displays the
DM>  > HTML code together with the image. 

DM> You need to set a base tag (method "setBase" of object "RESPONSE").

Thanks a lot. You helped me again.
I now use the following code in the view:

<html ...>
<body>
 ...
 <div metal:fill-slot="header">

  <span tal:define="base here/absolute_url;
                    dummy python:request.RESPONSE.setBase(base)">
  </span>
 </div>
 ...
 
This may not be very elegant, but it works.
However, when I put the <span> tag in the <html> or <body> tag, it
does not work and I'm not quite sure why.

Any solutions?

-- 
Regards,
 Rainer                            mailto:thadi@gmx.de