[Zope] Is directory context switching possible?
Loren Stafford
lstaffor@dynalogic.com
Fri, 25 Feb 2000 10:20:14 -0800
I don't really have a clear picture of your requirements, but if you are
building HREFs with dtml-var, look into the differences between
<dtml-var url>
and
<dtml-var absolute_url>
The latter has gotten me out of trouble many times.
There's no concept of "current directory" in Zope. In fact, there's no
concept of directory. When thinking of a "folder", think "object". When
building URLs, think "How can I make a URL that will map to my object?".
-- Loren
----- Original Message -----
From: Kevin Meinert <kevn@vrac.iastate.edu>
To: <zope@zope.org>
Sent: February 25, 2000 09:30 AM
Subject: [Zope] Is directory context switching possible?
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> That works, thanks.
> Now another question.
> - -----------------------
> When I click the "Vote" button on that page it can't find the link,
> because the links are now relative to the parent directory instead of
> to the "poll" directory.
>
> Is there a way to change the current directory so that anything you
> include will have it's links resolve correctly? I would think that
> <dtml-with> would do this, but it doesn't seem to.
>
>
> Im thinking the code should look like this, but don't know the right
> commands.
> The dtml-change dir would be the one I don't know..
> It pushes and pops the current folder state (or context):
>
> <dtml-changedir poll>
> <dtml-with poll> # this may be redundant...
> <dtml-var index_html>
> </dtml-with> # this may be redundant also...
> </dtml-changedir>
>
>
> (I know I *could* just go change the <a href>s in poll/index_html,
> but what if some other directory were to include it... i want
> general purpose! )
>