I have this structure type within a blueprint called event.yml
datetime:
label: Event Details
type: structure
fields:
date:
type: date
time: false
open:
label: Open Time
type: time
notation: 12
width: 1/3
close:
label: Close Time
type: time
notation: 12
width: 1/3
I’m trying to sort events on the parent page (events.yml) by the date that is within this datetime structure like so:
I’m just getting back to this since this is lower on the totem pole for my project. Is there an example of how something like this would then be called in yaml?
Oh wow, okay so the sorting had to happen within the page method? Alright, I was confused as to whether it had to happen in there or I just had to get the proper date and then sortBy in YAML would do the rest.
Hello, I am struggling (as always…), I have a structure date in a block, and I want to sort the blocks by the date in the structure. Is that possible? Here are the blueprints and the
dateStructure I’m using (… ) Can you help me, thank you
cours.yml:
cours:
type: blocks
pretty: true
sortBy: dateStructure asc
fieldsets:
text:
label: Liste des cours
type: group
fieldsets:
- event
event.yml:
name: Cours
fields:
[…]
calendrier:
label: Date du cours ou du dernier cours!
sortBy: date asc
type: structure
required: true
fields:
date:
label: Jour(s)
type: date
width: 1/2
default: today