rasteiner / k3-whenquery

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

Does this plugin work with blocks? #11

Closed timothyachumba closed 2 years ago

timothyachumba commented 2 years ago

I can't seem to get this plugin to work when i used it with block fields. It seems to work with all other fields, any thoughs?

rasteiner commented 2 years ago

Note to me:

This is correct. The BlocksField and LayoutsField are special cases in Kirby. They're represented as FieldClasses, not configuration arrays like the other fields use. Because of this the list of properties that is sent to the browser is hardcoded (see props function).

Can probably be solved by extending / overwriting BlocksField and LayoutsField to manually add a whenQuery prop to:

rasteiner commented 2 years ago

fixed in release 0.3.0