Possible blueprint bug with preview parent

To me it looks like a bug.

Parent

I was hoping that this would have the preview link to the parent. Instead it was linked to the current page.

title: Items
files: false
options:
  preview: parent
  status: false
  template: false
  delete: false

Moved preview

I moved preview out of options and it works.

title: Items
files: false
preview: parent
options:
  status: false
  template: false
  delete: false

This also works:

title: Items
files: false
preview: first-child
options:
  status: false
  template: false
  delete: false

https://getkirby.com/docs/panel/blueprints/page-settings

From the docs:

title: My blueprint
pages: true
files: true
options:
  preview: true
  status: false
  template: true
  url: true
  delete: false

It’s inside the options. Is it wrong with the docs, with Kirby or with me? :slight_smile:

2 Likes

The preview value (or rather all options) in the options only take “true” or “false” as values. So it’s not really a bug, just the way this feature is implemented (i.e. to either show those links in the sidebar or not). So maybe there’s some work left to be done to somehow unify that.

1 Like

Alright. While I now understand how it work I find it confusing to be able to have it in two different places and that it does different things depending on where it is placed.

Works:

Root placement boolean.

title: Items
preview: false
options:
  status: false

Works:

Options placement boolean.

title: Items
options:
  preview: false
  status: false

Works:

Root placement string.

title: Items
preview: parent
options:
  status: false

Doesn’t work:

Options placement string.

title: Items
options:
  preview: parent
  status: false
2 Likes

I agree and have added it as a feature request on GitHub.

2 Likes

Some settings look similar, like delete: true/false and deletable: true/false. To avoid errors I like to divide my blueprints with comments:

title: Équipe

# Page settings
icon: users

# Panel options
options:
  status: false
  template: false
  url: false
  delete: false

# Subpages settings
pages:
  sortable: true
  template:
    - membre

# File settings
files: false

# Form fields
fields:
  title:
    label: Title
    type: hidden
    …
2 Likes