<metal:editlink define-macro="editLink"
                tal:define="url xeditObjectUrl | context/@@absolute_url">
    <a href="#" title="Edit with External Editor"
       tal:attributes="href string:$url/external_edit"
       ><img src="edit.gif" alt="External Editor"
             tal:attributes="src context/++resource++edit.gif" /></a>
    <a href="#" title="Edit with WebDAV"
       tal:define="url python:url.replace('http://', 'webdav://admin@')"
       tal:attributes="href string:$url/"
       ><img src="edit.gif" alt="External Editor"
             tal:attributes="src context/++resource++edit.gif" /></a>
</metal:editlink>
