Page creation dialogue not working in pages section

Hi - I’m having trouble using the custom page creation dialogue within a pages section and wondered where I was going wrong.

When using the below blueprint the add page button gives me the following error:
‘basename(): Argument #1 ($path) must be of type string, array given’

title: Catalogues

tabs:
  catalogues:
    label: Catalogues
    icon: book
    columns:
      main:
        width: 1
        sections:
          pages:
            label: Catalogues
            type: pages
            template: catalogue
            layout: cards
            create:
              fields:
                title:
                  label: Catalogue name
                  type: text
              redirect: false
              status: listed
            image:
              cover: true
              ratio: 3/4    
  files:
    label: files
    icon: file
    columns:
      main:
        width: 1
        sections:
          files:
            type: files

Thanks!

That syntax does not make sense, the page creation dialog needs to be used on the page blueprint level, not within a section, see Page blueprint | Kirby CMS

Where did you read that you can use the create option within a section?

Thanks for the reply - simply put I didn’t, it’s the conclusion I obviously foolishly reached. I’ve only read that page you’ve linked to which doesn’t actually show where it sits in the blueprint in the example or the video. I can’t find any other pages or posts that cover it. It’s likely a silly question but I was hoping that’s what this forum was for.

I did put it at page level but it doesn’t make any different when I use the add button so I’m obviously going wrong somewhere:

title: Catalogues
icon: book

create:
  fields:
    title:
      label: Catalogue name
      type: text
  redirect: false
  status: listed

tabs:
  catalogues:
    label: Catalogues
    icon: book
    columns:
      main:
        width: 1
        sections:
          pages:
            label: Catalogues
            type: pages
            template: catalogue
            layout: cards
            image:
              cover: true
              ratio: 3/4    
  files:
    label: files
    icon: file
    columns:
      main:
        width: 1
        sections:
          files:
            type: files

              



You do not define fields within the create option. Since the title is already part of the page create dialog, you can do two things here:

  1. Change the label (but don’t change the field type)
create:
  title: # <-- not within the fields property!
    label: Product name
  1. Set a default value (only if you don’t want to make the field editable)
create:
    title: "{{ page.location }} – {{ page.date.toDate('M Y') }}"

Thanks for the reply @texnixe - I’ve realised what I’ve done. I’ve been applying it to the parent blueprint and not the child. So in this situation to catalogues and not catalogue, which is why nothing i was trying was working. To my mind you were affecting the add dialogue on the parent page so that’s where it goes, but now I know better. Thanks again for your patience.