# link

Source: https://zotonic.com/docs/1407/link

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

Language: en



Add 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="Add"
    class="btn"
    action={
        link
        subject_id=id
        predicate="contains"
        object_id=other_id
        action={
            reload
        }
    }
%}
```

Other arguments:

- element\_id
- edge\_template
- action - actions executed after linking

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1407?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/1407?language=en>)
