diff --git a/pages/02.post/post-form.md b/pages/02.post/post-form.md index 9851b7a..ce48379 100644 --- a/pages/02.post/post-form.md +++ b/pages/02.post/post-form.md @@ -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!' - diff --git a/themes/intotheeast/templates/tracker.html.twig b/themes/intotheeast/templates/tracker.html.twig index 46807f1..84fced8 100644 --- a/themes/intotheeast/templates/tracker.html.twig +++ b/themes/intotheeast/templates/tracker.html.twig @@ -2,7 +2,7 @@ {% block content %}
- {% set entries = page.children().order('date', 'desc').published() %} + {% set entries = page.children %} {% if entries|length > 0 %} {% for entry in entries %}