FuturShoc Posted September 4, 2014 Share Posted September 4, 2014 I've created a template for physicians. The template has several fields: title body specialty (Page Field) associated_clinics (Page Field) I need to build a search query against the physicians pages, using their specialty and associated_clinics values. But I can't seem to figure out how to write a selector for this purpose. Can anyone lend some insight? Link to comment Share on other sites More sharing options...
Jan Romero Posted September 4, 2014 Share Posted September 4, 2014 It depends on what you have. If you have the specialty as a string, you can select for the page’s title field like so: $pages->find('template=physician, specialty.title={$search}'); If you know the specialty’s page-id or path, that should work as well. For example on a specialty page, you would want to list all physicians that have that specialty: $pages->find('template=physician, specialty={$page->id}'); 3 Link to comment Share on other sites More sharing options...
FuturShoc Posted September 10, 2014 Author Share Posted September 10, 2014 Thank you for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now