---
title: "context-document-has-type"
description: "Optimize content creation by specifying document types in folders with 'context-document-has-type' evaluator. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/ui-dev/evaluators/context-document-has-type"
---

# context-document-has-type

If a Document is currently being observed and has a specific Type.

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

Example:

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

This block, taken from [create\_document](/documentation/gitana/4.0/developers/ui-dev/actions/create_document.md), limits the content types that can be created inside folders of type `my:articlesFolder` to `my:article`:

```
{
    "evaluator": "context-document-has-type",
    "condition": "my:articlesFolder",
    "config": {
        "content-types": {
            "remove": true,
            "items": [{
                "key": "my:article",
                "title": "My Article"
            }]
        }
    }
}
```

## See also

- [create\_document](/documentation/gitana/4.0/developers/ui-dev/actions/create_document.md)
- [new\_folder](/documentation/gitana/4.0/developers/ui-dev/actions/new_folder.md)
- [document-has-type](/documentation/gitana/4.0/developers/ui-dev/evaluators/document-has-type.md)
