<% Image.replacelink %>
render a link to delete action calls image.deletelink_macro, but only if the layout in path is the one this image belongs to

Sourcecode in Image/macros.js:
1:   function replacelink_macro(param) {
2:      if (this.layout && path.Layout != this.layout) {
3:         if (session.user) {
4:            try {
5:               path.Layout.images.checkAdd(session.user, req.data.memberlevel);
6:            } catch (deny) {
7:               return;
8:            }
9:            Html.openLink({href: path.Layout.images.href("create") + "?alias=" + this.alias});
10:           if (param.image && this.site.images.get(param.image))
11:              this.site.renderImage(this.site.images.get(param.image), param);
12:           else
13:              res.write(param.text ? param.text : getMessage("generic.replace"));
14:           Html.closeLink();
15:        }
16:        return;
17:     }
18:     return;
19:  }