About Create a Pages->find(query) as a field
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
|Category 1||Field Types|
Fieldtype modules that represent a data type used by fields.
|Category 2||Input Fields|
Inputfield modules that provide a UI input widget in the ProcessWire admin.
Close to stable, but users are advised to be cautious and test thoroughly.*
|Date Added||July 22, 2013|
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.
Usage is faily simple:
1: Install as a normal module
2: Create a field as a PagesSelectorQuery type
3: On the field details, enter your selector string, ie: template=my_template,select_page_field=$page
4: Add your field to whichever templates.
5: Access the PageArray results like you would any other $page->field
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- Input Fields
- Language Modules
- Language Packs
- Markup Generation
- Premium Modules
- Process Modules
- Proof of Concept
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.