---
title: "document-has-type"
description: "Optimize document actions for types like 'my:article' using the 'document-has-type' evaluator feature. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/ui-dev/evaluators/document-has-type"
---

# document-has-type

If the document has the given type.

```
{
    "evaluator": "document-has-type",
    "condition": "{type}"
}
```

## Example

This block, taken from the [Configuration](/documentation/gitana/4.0/developers/ui-dev/configuration.md) docs, adds a `custom-copy-text-to-clipboard` document action. It is included if the document is of type `my:article`, whether that document is a file or a folder.

```
{
    "evaluator": "document-has-type",
    "condition": "my:article",
    "config": {
        "document-actions": [{
            "id": "custom-copy-text-to-clipboard"
        }]
    }
}
```

## See also

- [Configuration](/documentation/gitana/4.0/developers/ui-dev/configuration.md)
- [context-document-has-type](/documentation/gitana/4.0/developers/ui-dev/evaluators/context-document-has-type.md)
