# $orderPage->isAncestorOf()

> Checks if the page is a direct or indirect ancestor of the given $page object

- Source: `src/Cms/Page.php#L560` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Cms/Page.php#L560>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$orderPage->isAncestorOf(Kirby\Cms\Page $child): bool
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$child` | `Kirby\Cms\Page` | `–` |

## Return type

`bool`

## Parent class

`Wagnerwagner\Merx\OrderPage` inherited from `Kirby\Cms\Page`
