FieldtypePagesSelectorQuery by alevine

This module allows you to defined a Pages selector query ($pages>find()) as a field and attach it to a template. The results of the query (PageArray) are accessed like any other page field, $page->myQuery

This module allows you to defined a Pages selector query ($pages>find()) as a field and attach it to a template. The results of the query (PageArray) are accessed like any other page field, $page->myQuery

I was trying to solve the problem of running a query as a field, and this is the result.

I started with Hanna text, but that didn't quite get me all the way. Then I tried just a Concat field, and that didn't get me all the way.

I modified the Concat fieldtype for my solution. I had a need to dynamically pull Pages that were cross-referenced back:
Product as a Page
Photo Pages with a multi-Page Select field that referenced Product (A photo could represent 1+ Products)


I wanted a ->photos field from Product that was updated dynamically according to what Photo entries were currently in place, and I didn't want copy/pasted code, and I wanted the selectors to be easily modifiable from the admin screens.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #563
    In the 563rd issue of ProcessWire Weekly we will share the latest weekly update from Ryan, as well as the latest news and updates from the ProcessWire community. Read on!
    Weekly.pw / 22 February 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer