Skip to content

Visibility Criterion

The Visibility Search Criterion searches for content based on whether it is visible or not.

This Criterion takes into account both hiding content and hiding Locations.

When used with Content Search, the Criterion takes into account all assigned Locations. This means that hidden content will be returned if it has at least one visible Location. Use Location Search to avoid this.

Arguments

  • value - Visibility constant (VISIBLE, HIDDEN)

Example

PHP

1
$query->query = new Criterion\Visibility(Criterion\Visibility::HIDDEN);

REST API

1
2
3
4
5
<Query>
    <Filter>
        <VisibilityCriterion>HIDDEN</VisibilityCriterion>
    </Filter>
</Query>
1
2
3
4
5
"Query": {
    "Filter": {
        "ContentIdCriterion": "HIDDEN"
    }
}