Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Filtering Pages field with blueprints

Started by Muut Archive 9 years ago · 2 replies · 819 views
9 years ago

Hello,

I'm trying to link posts with authors pages by using Pages (https://learn.getgrav.org/forms/blueprints/fields-available#the-pages-field) field, I would like to filter pages to /authors only. As far as I know, there is no such functionality in Grav yet (issue #1093 on GH/getgrav/grav).

Is it possible to filter pages by creating new form field type? (ref: https://learn.getgrav.org/forms/blueprints/advanced-features)

Doc's search with queries input@ and data-options@ leads only to that page, so I can't find a proper documentation for creating custom form fields.

Or maybe there are some other ways to achieve same features? Is it possible to bind pages/page titles to taxonomies?

Regards,
Leonid

9 years ago

You can set the start_route property on the field, and it will return only children pages of that route (in your case, /authors)

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2270 9 years ago
Archive · by Muut Archive, 9 years ago
2 1493 9 years ago
Archive · by Muut Archive, 9 years ago
2 4741 9 years ago
Archive · by Muut Archive, 9 years ago
1 3552 9 years ago
Archive · by Muut Archive, 9 years ago
3 1618 9 years ago