This question has been answered by lkfranklin. See the first response.
It's really difficult to create an extra that's simple to use but still allows complex searches on what is essentially custom data.
The main problem is that you have to find a way to create the search code from the $_POST data of a search form.
I tried to make ClassExtender as easy to use as I could, and it's pretty simple to add the extra fields to the schema and extra fields chunks. It's also relatively easy to get the GetExtResources snippet to do very complex searches using the &where property.
Unfortunately, the only way to use it to do what you want would be to have a custom snippet that gets the user input of the submitted form from the $_POST array, creates the appropriate &where clause, selects (or creates) the appropriate Tpl chunk, and calls $modx->runSnippet('GetExtResources') for the results. I can't think of any easier way to do it.
It's not rocket science, but it's daunting for people who are not fluent in PHP.
/* Get the template ID for the current resource */ $templateId = $resource->get('template'); /* do nothing if it's not 12 */ if ($templateId) != 12) { return ''; }
ClassExtender doesn't know anything about templates, but it's very easy to modify the plugin to handle them. If you only want to show it on pages using Template 12 (the ID is in parentheses next to the Template name in the Elements tree), just put this at the top of the plugin:
/* Get the template ID for the current resource */ $templateId = $resource->get('template'); /* do nothing if it's not 12 */ if ($templateId) != 12) { return ''; }
Then the plugin will only execute for the pages that use that Template. It's a good idea because otherwise, blank values will be saved for all the other resources. That's harmless, but it's a waste of time and DB space.
For your display, I would try using GetExtResources() first. The getResources snippet won't know about the extra fields, so you won't be able to use them in the search or the result.