[Zope] subpath in dtml?

Tino Wildenhain tino@wildenhain.de
Sun, 24 Nov 2002 21:09:02 +0100


Hi Jonatan,

just fix up your DTML :-) Use site-relative paths,
like /images/foo instead of just foo.

Regards
Tino


--On Sonntag, 24. November 2002 19:20 +0100 jonatan 
<jonatanpelikan@freemail.hu> wrote:

> On Sat, 2002-11-23 at 12:17, Tino Wildenhain wrote:
>> Hi Jonatan,
>>
>> just use the traverse_subpath in your Python script as you need
>> to. Thats pretty fine.
>> Then output your HTML using a template. If its a page template
>> you simply call
>> return context.yourOutputTemplate(context)
>
> i am doing this now.
>
> i have a python script called reg which calls reg_dtml :
>
> request = container.REQUEST
> return context.reg_dtml(context, request, fixreg=traverse_subpath[0])
>
> this if fine. but now the problem is that the dtml method gets called
> in the context of reg, which is not good... for example the images arent
> coming. http://something.com/reg/image.jpg is requested instead of
> http://something.com/image.jpg
>
>
> how do i call reg_dtml with another context?
>
> (i tried context.aq_parent, context.getParentNode, but didnt succeed)
>
>
> thanks,
>
>
>     - jonatan
>
>
>