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