Automatic change of slug via create in blueprint does not work with tabs?

Good evening and Servus

my goal is to automatically add the date in the slug for a blog article.

It works like charm if I put this into my article.yml blueprint:

create:
  fields:
    - slugdate
  slug: "{{ page.slugdate.toDate('Y-m-d') }}-{{ page.title.slug }}"

fields:
  slugdate:
    label: Published on
    type: date
    time: true
    default: now

But as soon as I combine this with a tab based layout, the popup dialog on page creation does not change:

tabs:
  article:
    title: Article
    num: '{{ page.date.toDate("Y-m-d") }}'
    icon: 📖
    create:
      fields:
        - slugdate
      slug: "{{ page.slugdate.toDate('Y-m-d') }}-{{ page.title.slug }}"

    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

    columns:
      main:
        width: 2/3
        fields:
          intro:
            type: textarea
            required: true
            minlength: 100
            maxlength: 300
          text:
            type: textarea
            size: large
[...]

What am I doing wrong? I am sure my idention/placement of the code is wrong but I tried every possible one and none worked.

Thanks
Andreas

This part may not be inside the tab, the general structure is always:

title:
options:
num: 
create:
tabs: # or columns, or sections or fields

See also:

Right. But why again? :slight_smile: I want to be able to have SEO and Translation done on a per page basis, where tabs are the easiest way to accomplish this.

Because the create prop is part of the general page blueprint, not of a particular tab. And you are trying to invent tab properties that don’t exist, so won’t work. And doesn’t make sense either.

Yes, but that has nothing to do with the create property.

Just in case anyone else is not able to fully grasp the wisdom of @texnixe : if you read what she says you will find that THIS will work :slight_smile:

title: Article
num: '{{ page.date.toDate("Y-m-d") }}'
icon: 📖
create:
  fields:
    - date
  slug: "{{ page.date.toDate('Y-m-d') }}-{{ page.title.slug }}"
tabs:
  article:
    status:
      draft:
        label: Draft
        type: pages
[....]