flokosiol / kirby-subpagelist

Subpagelist field plugin for Kirby 2
MIT License
46 stars 4 forks source link

Can't get filterBy to work #7

Closed jenstornell closed 8 years ago

jenstornell commented 8 years ago

Is this not correct in the blueprint?

myfield:
    type:  subpagelist
    filter:
      filterBy:
        filterMethod: category
        filterValue: somevalue
flokosiol commented 8 years ago

I need to add an example to the README and with the naming I did not make the best choice 👎

It works like https://getkirby.com/docs/cheatsheet/pages/filter-by

$key = filterBy
$operator = filterMethod
$value = filterValue

In the end it should look like this …

myfield:
    type:  subpagelist
    filter:
      filterBy: category
      filterMethod: ==
      filterValue: somevalue
jenstornell commented 8 years ago

I needed an even more complex solution so I ended with using my Fragment field for it. I bet this will come in handy when I need this field in another situation. But I agree, an example would be great in the readme.md or so.