[Zope-dev] absolute_url() and DTML Methods

Tres Seaver tseaver@palladion.com
Tue, 02 May 2000 09:18:32 -0500


Chimezie Thomas-Ogbuji <cogbuji@fourthought.com> wrote:
> 
> you should be able to append <dtml-var id> to the absolute_url() method
> call.  Althought I'm not sure if it that will append the id of the
> containing object or the id of the DTMLmethod itself (if it's the latter
> then that should work for you).  So this is what you want:
> 
> absolute_url() + "/" + <dtml-var id>

Actually, DTML methods don't expose their own 'id' (under that name), but that
of their acquisition context.  You need to use 'document_id' for what you want::

  absolute_url() + "/" + <dtml-var document_id>

> 
> Chimezie
> 
> Christian Scholz wrote:
> >
> > Hi!
> >
> > On Mon, May 01, 2000 at 10:27:56AM -0700, David Brown wrote:
> > > Why is it that when I call absolute_url() on a DTML Method, I get the
> > > URL of the enclosing container, not the DTML Method within that
> > > container?
> >
> > I think (but I am a newbie) that's the difference between dtml methods
> > and documents. Methods simply act as methods to the containing folder and
> > document are "real" objects. Thus moving from a method to a document
> > should change this behaviour.
> >
> > > Is there an equivalent method that will give me the real location of the
> > > DTML Method?
> >
> > Well, this I actually don't know..

Tres.
-- 
=========================================================
Tres Seaver  tseaver@digicool.com   tseaver@palladion.com