Fix critical issues: slug from date field, photo destination, tracker template
This commit is contained in:
@@ -39,7 +39,8 @@ form:
|
||||
label: Photos
|
||||
type: file
|
||||
multiple: true
|
||||
destination: '@self'
|
||||
destination: 'user://pages/01.tracker'
|
||||
limit: 10
|
||||
accept:
|
||||
- 'image/*'
|
||||
|
||||
@@ -53,12 +54,11 @@ form:
|
||||
-
|
||||
add-page-by-form:
|
||||
parent: '/tracker'
|
||||
slug: "{{ now|date('Y-m-d') }}"
|
||||
slug: "{{ form.value.date|date('Y-m-d') }}"
|
||||
template: 'entry'
|
||||
frontmatter:
|
||||
title: '{{ form.value.title }}'
|
||||
date: '{{ form.value.date }}'
|
||||
hero_image: '{% if form.files.photos %}{{ form.files.photos|first.path|split("/")|last }}{% endif %}'
|
||||
-
|
||||
message: 'Entry posted successfully!'
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user