<script type="text/javascript">
function save_path(content_path) {
  alert('setting link to ' + content_path);
  opener.document.edit_form.remote_url.value = content_path;
  window.close();

}
</script>

<dtml-tree branches_expr="contentValues()" sort="id"> 

<dtml-if "meta_type=='Folder'">

<img src="<dtml-var icon>">
<dtml-var getId> 

<dtml-else> 

<img src="<dtml-var icon>"> 
<a href="<dtml-var tree-item-url>" 
   onclick="save_path('<dtml-var "portal_url.getRelativeContentURL(this())" url_quote>');">
<dtml-var getId>
</a>

</dtml-if>
</dtml-tree>
