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 #549
    In the 549th issue of ProcessWire Weekly we’re going to check out the latest core updates, highlight one older yet still very relevant third party module, and more. Read on!
    Weekly.pw / 17 November 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH