# $orderPage->changeNum()

> Changes the sorting number. Low-level method, ensure to run all necessary checks (e.g. permissions) before calling it. The sorting number must already be correct when the method is called. This only affects this page, siblings will not be resorted.

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

```php
$orderPage->changeNum(null|int $num = null): Kirby\Cms\Page
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$num` | `null\|int` | `null` |

## Return type

`Kirby\Cms\Page`

## Exceptions

| Type | Description |
| --- | --- |
| `LogicException` | If a draft is being sorted or the directory cannot be moved |

## Parent class

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