# Page blueprint

Page blueprints are located in `/site/blueprints/pages` and control the Panel setup and form fields for pages.

****

- Read more: <https://getkirby.com/docs/guide/blueprints/introduction>

****

## Blueprint location

```filesystem
/site/blueprints/pages/
```

## Default page blueprint

To create the same set of fields for all pages, you can setup a `default.yml` that is used whenever no custom page blueprint is configured.

```filesystem
/site/blueprints/pages/default.yml
```

## Title

The title is required and will appear in the list of selectable templates when a new page is created and multiple templates are available.

```yaml
title: Article
```

### Translated titles

The title can be translated by passing an array of translations with the matching language code as key:

```yaml
title:
  en: Article
  de: Artikel
```

## Sorting

The `num` option defines which numbering scheme to use when a page is published.

<info>
Default sorting is numbering (1 to x) and doesn't need any setup.
</info>

### Alphabetical sorting by page uid

```yaml
num: zero
```

### Sorting by a custom sort number field

You may use a field value, for example from a field called `customSortNumberField`, to customize the sort order:

```yaml
num: '{{ page.customSortNumberField }}'
```

The return value of the query has to be an integer which will be used for sorting. Learn more about Kirby's <a href="https://getkirby.com/docs/guide/blueprints/query-language">query language</a>.

### Chronological sorting by date field

If your page blueprint contains a date field, you can use that date (and, optionally time) to sort your pages chronologically. For example, for a date field named `created`, you can apply the following:

#### By date
```yaml
num: '{{ page.created.toDate("Ymd") }}'
```

#### By datetime
```yaml
num: '{{ page.created.toDate("YmdHi") }}'
```

<info>
If you use a sorting scheme other than default sorting by number, i.e. automatic sorting, manual sorting in the Panel will be disabled.
</info>

## Statuses

With the `status` option, you define the page statuses you want to allow for the page. You can also change their label and description. This option gives you a lot of flexibility how you want to use page status in your website.

<info>The `draft` status of a page can not be removed or disabled – only its label and description can be changed.</info>

### Simple example

```yaml
status:
  draft: Draft
  listed: Published
```

### Extended example

```yaml
status:
  draft:
    label: Draft
    text: The article is still in draft mode. It can only be seen by editors with Panel access.
  unlisted:
    label: In Review
    text: The article is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The article is online and listed in the blog
```

## Page creation dialog

You can customize the page creation dialog that pops up when you create a new page. You can add fields, change the label of the title field, disable the automatic redirect to the new page and set its status.

```yaml
title: Product
create:
  title:
    label: Product name
  fields:
    - price
    - brand
  redirect: false
  status: listed
```

<figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=1444&amp;height=1518&amp;enlarge=0"><img alt="" class="rounded" height="971" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=924&amp;height=971&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=462&amp;height=486&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=690&amp;height=725&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=924&amp;height=971&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=1380&amp;height=1451&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dea35d7739-1717846665/page-creation-dialog.png?width=1444&amp;height=1518&amp;enlarge=0 1848w" width="924"></a></figure>
The button label changes depending on the status option set:

<figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=1140&amp;height=934&amp;enlarge=0"><img alt="" class="rounded" height="757" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=924&amp;height=757&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=462&amp;height=379&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=690&amp;height=565&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=924&amp;height=757&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=1140&amp;height=934&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f5011e59d7-1717846665/page-creation-status.png?width=1140&amp;height=934&amp;enlarge=0 1848w" width="924"></a></figure>

(screencast: https://youtu.be/rC9Up05WVnI title: Page creation dialog text: An example how to customize the page creation dialog for building a bookmark tool.)

### Automatic title and slug

The page create dialog also allows you to automatically generate title and/or slug instead of allowing the user to edit them manually. To do so, define the `title` and/or `slug` suboption as a string template:

```yaml
create:
  title: "{{ page.location }} – {{ page.date.toDate('M Y') }}"
  slug: "{{ page.location.slug }}-{{ page.date.toDate('Y-m-d') }}"
  fields:
    - location
    - date
```

Note that the page fields you want to query within the string template need to be in the list of fields within the create option (in this example, `location` and `date`), and those fields need to be present in the page blueprint itself.

However, you can also query information not specific to the current page through the `kirby` or `site` entry points.

This means, you could, for example, create a custom site method that returns the current Unix timestamp, and use that in your string template:

```yaml
create:
  title: "{{ site.time }}"
  slug: "{{ site.time }}"
```

And in a plugin, define the method

```php "/site/plugins/custom-methods/index.php"
<?php

Kirby::plugin('getkirby/custom-methods', [
  'siteMethods' => [
    'time' => function() {
      return time();
    }
  ]
]);

```
If title and slug are generated automatically, and no custom fields are defined for the page creation dialog, the dialog will be skipped and the page is created immediately.

### Supported field types

Currently, the list of supported field types in the dialog is limited to checkboxes, date, email, info, line, link, list, number, multiselect, radio, range, select, slug, tags, tel, text, toggles, time, url. Custom field types are disabled by default. To enable them, add your field type name to:

```php
Kirby\Panel\PageCreateDialog::$fieldTypes[] = 'yourFieldType'
```

## Options

With options, you can control all the page actions that should or should not be available for this particular page type. The option dropdown for pages will adjust accordingly.

| Option | Value | Description
|----    | ---- | ---- |
| `access`| `true`/`false` | page is not accessible and not listed
| `changeSlug` | `true`/`false` |
| `changeStatus` | `true`/`false` |
| `changeTemplate` | `false` or list of allowed template |
| `changeTitle` | `true`/`false` |
| `create` | `true`/`false` |
| `delete` | `true`/`false` |
| `duplicate` | `true`/`false` |
| `list`| `true`/`false` | page is accessible but not listed
| `move`| `true`/`false` |
| `preview` | `true`/`false`/template string (see below) |
| `read` | `true`/`false` | page is not accessible and not listed (will be deprecated in Kirby 5)
| `sort` | `true`/`false` |
| `update` | `true`/`false` |

<p>Each option can be set on a per user role for fine-grained permissions, for example:</p>
<figure class="code">
<pre><code class="language-yaml">options:
  delete:
    admin: true
    editor: false</code></pre>
</figure>
<p>Or using a wildcard to change the default for all roles:</p>
<figure class="code">
<pre><code class="language-yaml">options:
  update:
    *: false
    editor: true</code></pre>
</figure>
<p>Controlling accessibility for roles.</p>
<figure class="code">
<pre><code class="language-yaml"># Page is not accessible and not visible for all roles except admins.
options:
  access:
    *: false
    admin: true
  list:
    *: false
    admin: true</code></pre>
</figure>

<info>
Different option values per role currently don't work for the `changeTemplate` option (which takes a fixed list of allowed templates) or the `preview` option. These two options can only be controlled for all roles at once.
</info>

## Icon

The icon can either be one of our <a href="https://getkirby.com/docs/reference/panel/icons">own icons</a> or an emoji. Icons appear in page lists when no preview image is available.

```yaml
icon: page
```

### Emoji

```yaml
icon: 📚
```

## `image` options

The (preview) `image` blueprint option defines how any page with this blueprint will be presented, e.g. in a pages section:

```yaml "site/blueprints/pages/note.yml"
image: page.cover.toFile
```

With the Kirby query syntax, it allows you to specify which image to use to preview this page. However, it doesn't need to stop there. You can also specify the background or what icon instead of an image to use.

### Show icon instead of image

To display the icon set in the page blueprint or a default icon instead of a preview image, you can set the `image` option to `icon`:

```yaml
image: icon
```

Or when defining other options, set the `query` option to `false`:

```yaml
image:
  back: blue
  query: false
```

To show no image or icon at all, you can set the `image` option to `false`:

```yaml
image: false
```

### `query`

When defying other image preview options, you can use the `query` option for setting which image to use. It defaults to `page.image`.

```yaml
image:
  query: page.children.first.image
```

Make sure that the queries return the right format for each option. For example, the `query` option expects a `Kirby\Cms\File` object, so use `toFile` when necessary.

#### Preview image from assets folder

You can also provide an image from the assets folder via a page model or custom page method, for example as a fallback if the page has no images:

```php "/site/models/album.php"
<?php

class AlbumPage extends Page
{
    public function previewImage()
    {
        if ($image = $this->images()->first()) {
          return $image;
        }
        if (file_exists(kirby()->root('assets') . "/images/default.jpg")) {
            return new Asset("assets/images/default.jpg");
        }
        return false;

    }
}
```

And then in your blueprint

```yaml
image: page.previewImage
```

### `back`

Sets the image background.

```yaml

image:
  query: page.image.findBy("name", "cover")
  cover: true
  ratio: 1/1
  back: black
```

#### Examples

| `back: pattern` | `back: black` | `back: white` |
| -   | -   | -   |
| <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0"><img alt="" class="rounded" height="296" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/9d731e4cc5-1717846665/pattern.png?width=240&amp;height=296&amp;enlarge=0 1848w" width="240"></a></figure> | <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0"><img alt="" class="rounded" height="296" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2ad4783e2d-1717846665/black.png?width=240&amp;height=296&amp;enlarge=0 1848w" width="240"></a></figure> | <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0"><img alt="" class="rounded" height="296" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/dab81cb8ac-1717846665/white.png?width=240&amp;height=296&amp;enlarge=0 1848w" width="240"></a></figure> |

#### Custom colors
The `back` and `color` options for also support shorthands for the core CSS color variables as well as HEX codes or other native CSS color properties (e.g. even gradients).

```yaml
image:
  back: "purple-400"
```
Check out the <a href="https://lab.getkirby.com/public/lab/basics/design/colors">list of our color properties</a> for available options.

```yaml
image:
  back: "#ff0000"
```

```yaml
image:
  back: "linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)"
```

#### Support for queries

This option also support our powerful queries:

```yaml
image:
  back: "{{ page.myCustomBackColor }}"
```

### `color`

Sets the icon color. Allows for the same shortcuts and query support as the `back` option.

```yaml
image:
  query: false
  color: red-200
```

```yaml
image:
  query: false
  color: "{{ page.myCustomIconColor }}"
```

### `cover`

Whether or not the image will cover the available space.
Options: `true`, `false (default)`

```yaml
image:
  cover: true
```

#### Examples

| `cover: true` | `cover: false` |
| -   | -   |
| <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0"><img alt="" class="rounded" height="296" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5bb6d19ee3-1717846665/cover.png?width=240&amp;height=296&amp;enlarge=0 1848w" width="240"></a></figure> | <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0"><img alt="" class="rounded" height="296" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/5ad282a18b-1717846665/no-cover.png?width=240&amp;height=296&amp;enlarge=0 1848w" width="240"></a></figure> |

### `ratio`

A freely selectable image ratio

```yaml
image:
  ratio: 16/9
```

#### Examples

| `ratio: 2/3` | `ratio: 1/1` | `ratio: 3/2` | `ratio: 16/9` |
| -   | -   | -   | -    |
| <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0"><img alt="" class="rounded" height="416" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/27dc076369-1717846665/2by3.png?width=240&amp;height=416&amp;enlarge=0 1848w" width="240"></a></figure> | <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0"><img alt="" class="rounded" height="296" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/f9bf1c2e8f-1717846665/1by1.png?width=240&amp;height=296&amp;enlarge=0 1848w" width="240"></a></figure> | <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0"><img alt="" class="rounded" height="216" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/307aff0842-1717846665/3by2.png?width=240&amp;height=216&amp;enlarge=0 1848w" width="240"></a></figure> | <figure class="image"><a data-lightbox href="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0"><img alt="" class="rounded" height="191" loading="lazy" sizes="auto" src="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0" srcset="https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0 462w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0 690w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0 924w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0 1380w, https://assets.getkirby.com/media/pages/docs/reference/panel/blueprints/page/2d392337a1-1717846665/16by9.png?width=240&amp;height=191&amp;enlarge=0 1848w" width="240"></a></figure> |

<info>
You are not limited to the example ratios above. In fact, Kirby calculates the ratio for you as long as you enter it in the format **`a/b`**
</info>

## Preview

You can change the link of the preview button or disable it entirely with the option setting.

### Disabling the preview button

For some pages it makes sense to disable the preview entirely.

```yaml
options:
  preview: false
```

### Custom link

The `preview` option can also take any absolute link or a template string.

#### Absolute URL

```yaml
options:
  preview: https://preview.mysite.com
```

#### Template string

You can use Kirby's powerful <a href="https://getkirby.com/docs/guide/blueprints/query-language">query syntax</a> to create any link dynamically.

```yaml
options:
  preview: "{{ page.parent.url }}/#{{ page.slug }}"
```

## Change templates

You must define a list of compatible templates with the `changeTemplate` option to allow editors to switch between page templates.

```yaml
options:
  changeTemplate:
    - video-post
    - link-post
    - text-post
```

<info>When an editor switches templates, all fields with the same name and type will be synced. Incompatible fields will be discarded. Be aware of this step when you define the list of compatible templates.</info>

## Navigation option
The previous/next item navigation in the Panel is a very effective way for editors to move between content. With `navigation` option you can improve the usability of the navigation for your users with additional options to customize the links.

### Navigate between all pages

```yaml "/site/blueprints/pages/default.yml"
title: Simple Page
navigation:
  status: all
  template: all
```

### Limit navigation by template & status type

```yaml "/site/blueprints/pages/default.yml"
title: Simple Page
navigation:
  status:
    - draft
    - unlisted
  template:
    - album
    - default
```

### Adjust the sorting of the previous/next page
```yaml "/site/blueprints/pages/default.yml"
title: Simple Page
navigation:
  status: listed
  template: default
  sortBy: title asc
```

<details class="since list-none" open="1">
<summary >
	Since <a href="https://github.com/getkirby/kirby/releases/tag/5.0.0">5.0.0</a></summary>
<div>
	<h2 id="view-buttons"><a href="#view-buttons" tabindex="-1">View buttons</a></h2>
<p>Kirby allows you to define what buttons to use for this page. To select which (default) buttons to show on a particular view you can set the <code class="type">buttons</code> option in the corresponding blueprint:</p>
<figure class="code">
<pre><code class="language-yml">buttons:
  settings: true</code></pre>
</figure>
<p>By setting the value to <code class="type type-bool">true</code>, you can reference existing buttons (from the <a href="https://getkirby.com/docs/reference/system/options/panel/panel-view-buttons#referencing-buttons">core or <code class="type">config.php</code> file</a> or even <a href="https://getkirby.com/docs/reference/plugins/extensions/panel-view-buttons">Panel area plugin extensions</a>) by name and decide which ones to include and in what order.</p>
<h3 id="view-buttons__create-a-new-button"><a href="#view-buttons__create-a-new-button" tabindex="-1">Create a new button</a></h3>
<p>You can now also define your own custom buttons directly in a blueprint:</p>
<figure class="code">
<pre><code class="language-yml">buttons:
  settings: true
  social:
    icon: mastodon
    text: Mastodon
    link: "https://mastodon.social/@getkirby"
    theme: purple-icon</code></pre>
</figure>
<p>The available options are based on the <a href="https://lab.getkirby.com/public/lab/docs/k-view-button"><code class="type">k-view-button</code> component</a>. Check out the <a href="https://getkirby.com/docs/reference/system/options/panel/panel-view-buttons">config option documentation</a> for more details, e.g. in regard to available attributes or query support.</p>
<h3 id="view-buttons__disable-all-buttons"><a href="#view-buttons__disable-all-buttons" tabindex="-1">Disable all buttons</a></h3>
<figure class="code">
<pre><code class="language-yml">buttons: false</code></pre>
</figure></div>
</details>

## Examples

You can find examples of different types of page blueprints in the <a href="https://getkirby.com/docs/reference/panel/samples">samples section</a>.