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.

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK