# unlink

Source: https://zotonic.com/docs/1408/unlink

URI: https://zotonic.com/id/1408

Language: en



Remove an [edge](/id/doc_glossary#term-edge) between two [resources](/id/doc_glossary#term-resource). Used in the admin.

The edge is selected with either:

- the argument `edge_id`
- the arguments `subject_id`, `predicate`, `object_id`

For instance:

```django
{% button
    text="Remove"
    class="btn"
    action={
        unlink
        subject_id=id
        predicate="contains"
        object_id=other_id
        action={
            reload
        }
    }
%}
```

Other arguments:

- hide - selector to fade out after unlink
- edge\_template - passed on to the undo action template
- action - actions executed after unlink
- undo\_action - passed on to the undo action template
- undo\_message\_id - defaults to unlink-undo-message

After update, an undo message is rendered in the undo\_message\_id target, with the template `_action_unlink_undo.tpl`.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1408?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1408?language=en>)
