Closed (fixed)
Project:
Finder
Version:
6.x-1.10
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2011 at 03:25 UTC
Updated:
22 Jul 2011 at 01:21 UTC
Currently, the title on results page is per what we have entered in title field in finder settings page. It would be really nice if we can change it to show the searched keywords, for example:
Instead of Finder 1...
Change it to:
Search results for "keyword 1" "keyword 2"...
Is this possible?
Comments
Comment #1
danielb commentedYou can override theme_finder_results and within it use drupal_set_title() to change the title based on this variable:
I don't wish to develop or maintain a one-size-fits-all solution with something like this, unless someone can come up with a really simple to maintain patch where perhaps the burden to configure this correctly is on the user not on finder.
Comment #2
deanloh commentedThank you Daniel for the quick response.
If it's not too much of me to ask... can I trouble you to show me an example of codes for overriding the title? The only thing I know is I need to edit template.php, but how to do it I'm completely clueless. I'll buy you beer.
Comment #3
danielb commentedWell you'd probably use placeholders like
Of course you will have to assemble the $words array based on $keywords, and that will be the tricky part because the structure of $keywords will depend on your finder. You could probably also use post values to get the data.
And you'll need to know how to theme to be able to do this, which is not something specific to finder.
My advice is if you feel completely clueless then... don't do this. If you want a great site that works exactly how you want, then you have to have the skills to tweak it, or hire someone that does. If you want to build a site easily without being a developer, then you just have to live with the basic features.