Filter entries on panel select field


I want to implement a field that lists certain children of a page, but I must filter them by their category to display only one kind. Something like this:

    label: Related
    type: structure
    entry: {{related}}
        label: Post
        type: select
        options: query
          page: posts
          category: sample // something like this

There’s a way for doing this?


Out of the box you can only filter by template, not by a fields within a text file. But your could create a custom field for that purpose.

Well, thanks for the push.

I created a new field that extends the basic select field and add a filter option. If anyone need anything similar, I shared here:

I use this inside a structure field for a kind of a “related pages” field, so maybe the next step is to create a collection field that extends the structure only for a single field: an entity.

Cool, thanks for sharing. This will certainly come in handy sooner or later.