rasteiner / k3-whenquery

Conditionally show fields and sections. Better.
MIT License
64 stars 1 forks source link

Show section when other file section holds files #10

Open trych opened 2 years ago

trych commented 2 years ago

Hi there,

I want to conditionally show a file section when another file section holds at least one file, otherwise it should be hidden. I could test for the page holding any files with a specific template, but I don't understand how I can access the page.files collection in the whenQuery field. Is there any way to do that?

Thanks!

rasteiner commented 2 years ago

Currently you don't have access to sections, just what the "page model" holds (that is "content" which is stored by fields).

I have to investigate if and how we can access sections, because they don't keep their data in the global store