Friday, April 20, 2012

Drupal 7 Views Contextual Filters Title Override

I have a view that returns search results via the search API. It performs this use case adequately and I am happy. To crown the deliverable, I need to add a title override of the form Showing search results for '%1' which looks easy enough initially but it isn't working entirely as planned.



For a URL = mysite.com/search/all?search=wombat, where the search value is gathered from an exposed form within a block, I am either getting:




Showing search results for 'Search for "all"'




or, if I enter %1 in the title override for subject not appearing in the URL, I get:




Showing search results for %1". My goal is to get "Showing search results for 'wombat'




The title override works in that it removes the Search for ... part but the substitution picks up on "all" as the exception value (or anything else that I set as the exception value) where I need to be able to pick up the value of the query string (search=wombat).



Can anyone shed some light here?





No comments:

Post a Comment