The current release (0.5) patches the general Zope find results page (thanks to Jim Washington). The general way to add a link (in dtml) to your own template that discovers whether external editor is available would be: <dtml-if externalEdit_> <dtml-var expr="externalEditLink_(this())"> </dtml-if> This assumes version 0.5 or better. -Casey On Thursday 12 September 2002 12:50 pm, Peter Bengtsson wrote:
Stefan,
When you get a search result using the ReplaceSupport product I think it would be great if next to every link there's a little ExternalEditor pen for the ExternalEditor product for those who have that installed.
I tried quickly and it works but I'm not sure how good it is. What I tried was this, around line 80 in dtml/replaceResults.dtml
<!-- Peter addition --> <dtml-let explicit="_.getitem('sequence-item').aq_explicit" parent_url="explicit.aq_parent.absolute_url()"> <dtml-if expr="_.hasattr(explicit, 'manage_FTPget') or _.hasattr(explicit, 'read') or _.hasattr(explicit, 'document_src')"> <a href="&dtml-parent_url;/externalEdit_/<dtml-var "explicit.getId()">" 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> <dtml-if locked_in_version> <dtml-if modified_in_version> <img src="&dtml-BASEPATH1;/p_/locked" alt="This item has been modified in this version" /> <dtml-else> <img src="&dtml-BASEPATH1;/p_/lockedo" alt="This item has been modified in another version" /> (<em>&dtml-locked_in_version;</em>) </dtml-if> </dtml-if> <!-- / Peter addition -->
In my product QuickLinks (http://www.zope.org/Members/peterbe/QuickLinks) I override the same stuff as ExternalEditor does if you wanna see how I made the distinction between having and not having ExternalEditor installed