Skip to content

Sibling Criterion

The Sibling Search Criterion searches for content under the same parent as the indicated Location.

Arguments

  • locationId - int representing the Location ID
  • parentLocationId - int representing the parent Location ID

Example

PHP

1
$query->query = new Criterion\Sibling(59, 2);

You can also use the named constructor Criterion\Sibling::fromLocation and provide it with the Location object:

1
2
$location = $locationService->loadLocation(59);
$query->query = Criterion\Sibling::fromLocation($location);

REST API

REST API

1
2
3
4
5
6
7
8
<Query>
    <Filter>
        <SiblingCriterion>
            <locationId>85</locationId>
            <parentLocationId>81</parentLocationId>
        </SiblingCriterion>
    </Filter>
</Query>
1
2
3
4
5
6
7
8
"Query": {
    "Filter": {
        "SiblingCriterion": {
            "locationId": 85,
            "parentLocationId": 81
        }
    }
}