Adding Custom Search Term To Results Title

We have a variety of custom searches for things like "Products under $10".

We'd like to be able to change the results page title to match.

I know that some dispatches will write a matching page title of ON SALE:

?dispatch=products.on_sale

But how do we do same for queries like this, to replace the default "SEARCH RESULTS" heading?

?dispatch=products.search&search_performed=Y&features_hash=P0-100-CAD&sort_by=price&sort_order=desc

We've hacked some things together in the past that worked, but what's the right way to do this?

You can use the My changes module and products.post.php controller. Just check how it works in the Bestsellers module

app/addons/bestsellers/controllers/frontend/products.post.php

You can specify search parameters and title for each custom mode