### Sidebar widget with links to deployments (build triggers) per model with configurable url path (e.g. \`/{locale}/blog/{slug}\`)

(Image content)

[

**This is a Community Plugin!** Learn how create your own plugin, or copy and remix existing ones in our documentation

](https://www.datocms.com/docs/plugin-sdk/introduction.md)

## DatoCMS plugin: Model Deployment Links

**This DatoCMS plugin adds a sidebar widget with links to deployments (build triggers) *per model with configurable url path* (e.g. `/{ locale }/blog/{ slug }`), so your editors can easily view the item they are editing.**

(Image content)

## Features

-   Supports customisable URLs per model in your CMS.
-   Supports single and multi-language instances.
-   Supports multiple deployment environments (build triggers).

## Background

By default DatoCMS already links to your depoyment environments in the main menu:

(Image content)

These items link to the **Website frontend URL** you entered for the related build trigger:

(Image content)

This plugin adds links to **model-specific URLs** on those websites:

(Image content)

The sidebar shows a link for each deployment environment. The URL is based on the form values of the item being edited and optionally the current locale.

This enables your editors to directly view the item they are editing.

## Configuration

First add this plugin via DatoCMS Settings \> Plugins \> Add (`/admin/plugins/new`).

### Global plugin settings

Then enter the DatoCMS API full-access token used to fetch this deployment environments (build triggers):

(Image content)

This token is available via Settings \> API Tokens \> Full-access API token (`/admin/access_tokens/`).

### Model specific settings

Add the sidebar widget to a model by adding a **JSON field** and setting the presentation to **Model Deployment Links**:

(Image content)

Enter the URL pattern for this model. You can add model field values using `{ field_key }`. The item ID and item model API key are available using `{ id }` and `{ modelApiKey }`. The current locale is available using `{ locale }` (*note: localization must be enabled on the field* to make the `locale` value available).

This results in **model-specific URLs** in the sidebar of your content page:

(Image content)

---

## Contributing

See [contributing.md](https://www.datocms.com/marketplace/plugins/i/contributing.md).

## Credits

Scaffolded using [DatoCMS plugin Yeoman generator](https://github.com/datocms/generator-datocms-plugin).

## License

[MIT Licensed](https://www.datocms.com/marketplace/plugins/i/license.md) by [De Voorhoede](https://www.voorhoede.nl/).