[Zope] Re: Zope External Editor for other folderish containers

Casey Duncan casey@zope.com
Fri, 24 May 2002 14:41:47 -0400


On Friday 24 May 2002 01:34 pm, Jim Washington wrote:
> Casey Duncan wrote:
>=20
> >On Friday 24 May 2002 11:58 am, Jim Washington wrote:
> >[snip old stuff]
> > =20
> >
> >>Hi, Casey
> >>
> >>This is a Truly Masterful Product! Thanks!
> >>
> >>I've done some work to make it work (for me) in other places, and it=20
> >>appears that the link code:
> >>
> >>  <dtml-let explicit=3D"_.getitem('sequence-item').aq_explicit">
> >>    <dtml-if expr=3D"_.hasattr(explicit, 'manage_FTPget')
> >>                   or _.hasattr(explicit, 'read')
> >>                   or _.hasattr(explicit, 'document_src')">
> >>      <a href=3D"&dtml-URL1;/externalEdit_/&dtml.url_quote-sequence-k=
ey;"
> >>         title=3D"Edit using external editor"
> >>      ><img src=3D"&dtml-BASEPATH1;/misc_/ExternalEditor/edit_icon"
> >>            align=3D"middle" hspace=3D"2" border=3D"0" alt=3D"Externa=
l Editor"=20
> >>/></a>
> >>    </dtml-if>
> >>  </dtml-let>
> >>
> >>will be reused over and over.
> >>
> >>I was wondering whether you might consider in the future factoring th=
e=20
> >>link code into a separate DTML method so that it can be obtained by=20
> >>acquisition.  That way, the code would reside once in e.g.,=20
> >>ObjectManager; and then OrderedFolder, FindSupport, etc. could acquir=
e=20
> >>it by using e.g., <dtml-var external_editor_link> instead of a full c=
opy=20
> >>of the link code. =20
> >>   =20
> >>
> >
> >This sounds like a pretty good idea. I'll do this in the next release.
> >
> >Thanks for the suggestions!
> >
> >-Casey
> > =20
> >
> And one always finds a problem right after publishing, right?
>=20
> The link calculation needs to be something like
>=20
> <a href=3D "<dtml-var=20
>=20
expr=3D"explicit.absolute_url()[:explicit.absolute_url().rfind('/')]">/ex=
ternalEdit_/<dtml-var=20
> expr=3D"explicit.getId()">"

After looking at that, one word comes to mind: ohmygod!

Hows about: aq_inner.aq_parent.absolute_url()?

I think I'll try that on for size instead. ;^)

Thanks for pointing this out though.

-Casey