# Page models

- Read more: <https://getkirby.com/docs/guide/templates/page-models>

****

Page models are registered with the `pageModels` extension.

Page models extend Kirby's default `Page` object. Methods that you define in a page model are available everywhere in Kirby where you call a page of the extended type.

```php "/site/plugins/page-models/index.php"
class BlogPage extends Page
{
	// your custom page methods
}

Kirby::plugin('my/pageModels', [
	'pageModels' => [
		'blog' => BlogPage::class
	]
]);
```

In a real world example, you would usually put the class in a separate file, e.g. `/models/BlogPage.php` in your plugin folder:

```php "/site/plugins/page-models/models/BlogPage.php"
<?php

class BlogPage extends Page
{
	// your custom page methods
}
```

And then load it in your plugin's `index.php`:

```php "/site/plugins/page-models/index.php"
<?php

load([
    'BlogPage' => 'models/BlogPage.php',
], __DIR__);

Kirby::plugin('my/pageModels', [
	'pageModels' => [
		'blog' => BlogPage::class
	]
]);
```

For details on how to use page models, see <a href="https://getkirby.com/docs/guide/templates/page-models">our guide on page models</a>.