Jump to content

Adding the query string to search result links


Recommended Posts

Unsure where best to ask and/or request this so giving a go here

This was brought up by me (and others?) on the 4.1 alpha/beta test site; asking for search term highlighting in search results. What we got was highlighting on the search results page (or maybe it was made better on the results page?) however what remains missing was the IPB 3x feature where the search term highlight carries through to the actual content item. I seem to recall the responding developer "not liking them" or some such. I may be mis-remembering some of this but that was the basic gist of the thing.

So I took a look at the core files tonight to see where and how one could jack in the query term into the url - a basic ?q=my_search_term addition or whatever. 

I see that the results in the theme template are just a foreach dump of $results as {$result->html()|raw}

Further upstream it gets .. confusing.. to me at least. If I was guessing I'd say you were just pulling over the results as "content items" and not assembling the results by hand.

So... formally requesting we get the query term appended to those individual search result links. That would allow us to do our own search highlighting thing on the end result pages, be it simple css background flares or more complex jquery page movements to multiple terms on the page.

As for making me rough it out myself I'd love a push in the right direction as to where in the search method/s I can hook the url build process. I clearly see where the search results page url is getting built out but not so much the actual content items - hence my guess that these are being pulled over "whole" making this rough sledding from a hook standpoint.

Might be wrong... gonna keep digging...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...