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