Hello,
I’m working on a new web project with Kirby 5.2.3 and I’ve started from scratch with the PlainKit.
On the blueprints, I’ve defined a “projets.yml” + “projet.yml” and there’s two option available for each project.
Like so:
title: Projet
icon: page
num: default
status:
draft: Brouillon
listed: Publié
options:
changeTemplate: false
columns:
main:
width: 2/3
fields:
category:
label: Direction du projet
type: radio
columns: 2
required: true
default: down
options:
down: "↓ Scroll vers le bas (après le titre LA)"
up: "↑ Scroll vers le haut (avant le titre LA)"
help: "Choisissez la direction d'exploration de ce projet"
On the “projets.yml”, I’m using the query function in order for each section: up or down, to filter the desired data.
Like so:
title: Projets
icon: images
num: 2
options:
changeSlug: false
changeTemplate: false
delete: false
tabs:
content:
label: Tous les projets
icon: images
sections:
info:
type: info
text: |
**Organisation des projets**
Glissez-déposez pour réorganiser l'ordre dans chaque catégorie.
L'ordre ici = ordre sur le site.
down_section:
type: pages
headline: "↓ Projets Scroll Bas"
parent: site.find('projets')
status: listed
template: projet
# query: site.find('projets').children.filterBy('category', 'down')
layout: cards
sortable: true
size: small
image:
cover: true
ratio: 3/2
info: "{{ page.lieu }} • {{ page.date.toDate('Y') }}"
empty: Aucun projet (ajoutez-en et choisissez "Scroll bas")
help: "G
lissez-déposez pour réorganiser"
My prototype with my templates in front works fine but:
- with the “query: site.find(‘projets’).children.filterBy(‘category’, ‘down’)”, I can’t move manually my projects within each section anymore.
- if I’m uncomment it, it works but I’m losing the ability to sort it manually
- this is a major problem for this project.
- is it a bug? a limititation? or have I set up something wrong?
Many thanks for your help.
Cheers.
Nicolas
