Skip to content

ContentTypeId Criterion

The ContentTypeId Search Criterion searches for content based on the ID of its content type.

Arguments

  • value - int(s) representing the content type ID(s)

Limitations

ContentTypeId can be used on all search engines.

Example

PHP

1
$query->query = new Criterion\ContentTypeId([44]);

REST API

1
2
3
4
5
<Query>
    <Filter>
        <ContentTypeIdCriterion>44</ContentTypeIdCriterion>
    </Filter>
</Query>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "ViewInput": {
        "identifier": "ContentTypeIdCriterionTest",
        "Query": {
            "Filter": {
                "ContentTypeIdCriterion": 44
            }
        }
    }
}