Added FieldtypePagesSelectorQuery.module

 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