diff --git a/pages/02.post/post-form.md b/pages/02.post/post-form.md index 1169c3a..59ab057 100644 --- a/pages/02.post/post-form.md +++ b/pages/02.post/post-form.md @@ -3,7 +3,16 @@ title: 'New Entry' template: post-form access: site.login: true -login_redirect_here: true + +pageconfig: + parent: '/tracker' + slug_field: 'date,title' + overwrite_mode: false + +pagefrontmatter: + template: entry + published: true + form: name: new-entry action: /post @@ -39,7 +48,7 @@ form: label: Photos (max 4) type: file multiple: true - destination: 'user://pages/01.tracker' + destination: '@self' limit: 4 accept: - 'image/*' @@ -84,19 +93,7 @@ form: process: - - add-page-by-form: - parent: '/tracker' - slug: "{{ form.value.date|date('Y-m-d-Hi') }}-{{ form.value.title|lower|regex_replace('/[^a-z0-9]+/', '-')|trim('-') }}" - template: 'entry' - frontmatter: - title: '{{ form.value.title }}' - date: '{{ form.value.date }}' - lat: '{{ form.value.lat }}' - lng: '{{ form.value.lng }}' - location_city: '{{ form.value.location_city }}' - location_country: '{{ form.value.location_country }}' - weather_temp_c: '{{ form.value.weather_temp_c }}' - weather_desc: '{{ form.value.weather_desc }}' + add_page: true - message: 'Entry posted successfully!' -