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

**URL:** <https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926>\
**Category:** Questions\
**Created:** [June 24, 2024, 8:30pm UTC](https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926 "2024-06-24T20:30:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_1](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Andreas\_1](https://forum.getkirby.com/u/Andreas_1)\
**Post date:** [June 24, 2024, 8:30pm UTC](https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926/1 "2024-06-24T20:30:23Z")

</div>

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:

```auto
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:

```auto
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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 24, 2024, 9:01pm UTC](https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926/2 "2024-06-24T21:01:25Z")

</div>

> [@Andreas\_1](#):
>
> ```auto
> title: Article
> num: '{{ page.date.toDate("Y-m-d") }}'
> icon: 📖
> 
> ```

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

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

```

See also:

- [Samples | Kirby CMS](https://getkirby.com/docs/reference/panel/samples/)
- [Basic blueprint knowledge | Kirby CMS](https://getkirby.com/docs/guide/blueprints/introduction)

---

<div class="post-metadata">

**Author:** ![Andreas\_1](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Andreas\_1](https://forum.getkirby.com/u/Andreas_1)\
**Post date:** [June 29, 2024, 10:37am UTC](https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926/3 "2024-06-29T10:37:16Z")

</div>

> [@texnixe](#):
>
> This part may not be inside the tab, the general structure is always:

Right. But why again? 🙂 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.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 29, 2024, 10:57am UTC](https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926/4 "2024-06-29T10:57:29Z")

</div>

> [@Andreas\_1](#):
>
> But why again?

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.

> [@Andreas\_1](#):
>
> I want to be able to have SEO and Translation done on a per page basis

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

---

<div class="post-metadata">

**Author:** ![Andreas\_1](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Andreas\_1](https://forum.getkirby.com/u/Andreas_1)\
**Post date:** [June 29, 2024, 6:06pm UTC](https://forum.getkirby.com/t/automatic-change-of-slug-via-create-in-blueprint-does-not-work-with-tabs/31926/5 "2024-06-29T18:06:38Z")

</div>

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 🙂

```auto
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
[....]

```
