# $ordersPage->changeSlug()

> Changes the slug/uid of the page

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

```php
$ordersPage->changeSlug(string $slug, null|string $languageCode = null): Kirby\Cms\Page
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$slug` | `string` | `–` |
| `$languageCode` | `null\|string` | `null` |

## Return type

`Kirby\Cms\Page`

## Exceptions

| Type | Description |
| --- | --- |
| `LogicException` | If the directory cannot be moved |

## Parent class

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