Hey everyone,
Is it possible to show in Pages field only certain pages by their UUID ?
Doing for example:
fields:
selection:
type: pages
label: Sélection des sous-pages de la page {{ page.title }}
query: site.children.findBy('uuid', ['WWX33m8mf79j1CUW','Ky3tVOzt68TmfMs8','kaXOlp8JIPe5l8rD'])
The aim is not to use the page name because the user can change it:
query: site.children.find(['ressources','solutions','persona'])
texnixe
2
Try filterBy
and you have to pass the uuid with the schema page:/xxxxx
Hi Texnixe,
Do you mean?
query: site.children.filterBy('uuid', ['page:/WWX33m8mf79j1CUW','page:/Ky3tVOzt68TmfMs8','page:/kaXOlp8JIPe5l8rD'])
I tried but got “No pages to select” in the select dialog. Maybe sadly it’s not possible.
texnixe
4
Almost, with an array you need to use in
:
query: site.children.filterBy('uuid', 'in', ['page:/WWX33m8mf79j1CUW','page:/Ky3tVOzt68TmfMs8','page:/kaXOlp8JIPe5l8rD'])
Note that site.children
only fetches first level pages.
Yes, that’s exactly what I just tried and it’s the right request.
We’re synchro!
Thanks!