Top Navigation Search highlighting
-
- Jr. Propeller Head
- Posts: 8
- Joined: Fri Jun 12, 2015 12:56 pm
Top Navigation Search highlighting
In the topics linked from search results, how do I get highlighting to work? I cannot figure this out. The link has the "highlight=Xxxxx" url parameter, I have set all 11 highlight styles in the main stylesheet.
The highlighting section of the doc says "In HTML5 Top Navigation, the search hits are transparent by default" then helpfully never mentions how to change this default behavior.
I'm a little frustrated, right now.
The highlighting section of the doc says "In HTML5 Top Navigation, the search hits are transparent by default" then helpfully never mentions how to change this default behavior.
I'm a little frustrated, right now.
Re: Top Navigation Search highlighting
All you should have to do is set styles for span.SearchHighlight1, span.SearchHighlight2.
As described here: http://webhelp.madcapsoftware.com/flare ... h_Hits.htm
Have you checked that you added these styles to the right medium in the stylesheet, e.g. they're not in print by accident?
As described here: http://webhelp.madcapsoftware.com/flare ... h_Hits.htm
Have you checked that you added these styles to the right medium in the stylesheet, e.g. they're not in print by accident?
Re: Top Navigation Search highlighting
I am using the Top Nav skin to produce HTML5 output. I have added a span.SearchHighlight class to my CSS, where the font color is set to purple to make matched keywords stand out in the abstracts (as opposed to a background color). However, my output is still showing the keywords in black text. I have tried setting this both from the Stylesheet Editor and from the Internal Text Editor, and in the preview of the Stylesheet Editor, the text is purple.
Is there another setting I need to enable to get this working? I also can't get partial word searching to work, so maybe this is related.
Is there another setting I need to enable to get this working? I also can't get partial word searching to work, so maybe this is related.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Top Navigation Search highlighting
I’m pretty sure that the solution Dave pointed to is still the correct solution. You need to define the colors for span.SearchHighlightN where N is 1, 2, 3, etc. for the first search word, second search word, third search word, etc. I don’t think it’s sufficient to define span.SearchHighlight.
For Flare 2020 r2, this is covered here: https://help.madcapsoftware.com/flare20 ... h-Hits.htm
For Flare 2020 r2, this is covered here: https://help.madcapsoftware.com/flare20 ... h-Hits.htm
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Top Navigation Search highlighting
Thanks, I defined span.SearchHighlight, and 1-10, and am getting the same result unfortunately.
Re: Top Navigation Search highlighting
Ah, OK. Maybe I am looking for something else. I now see that my properties are being applied once I click a result and go to a topic page. This is good, but I was looking for something that will highlight the search term within the search results page. Right now the matched words just display bold, using the font color of the abstract. I'd like to vary just the color of the search term within the abstract on the search results page. Is this possible?
Re: Top Navigation Search highlighting
No, Flare doesn't support that.
Flare also just applies a bold tag on the search results page, so even if you tried some hacky CSS, you can't style the search terms separately.
Flare also just applies a bold tag on the search results page, so even if you tried some hacky CSS, you can't style the search terms separately.
Re: Top Navigation Search highlighting
I think it might have changed, unless Madcap is doing something funky with their own help?
This search has a <span class="search-result-highlighr"> on the bolded terms.
https://help.madcapsoftware.com/flare20 ... q=variable
This search has a <span class="search-result-highlighr"> on the bolded terms.
https://help.madcapsoftware.com/flare20 ... q=variable
Re: Top Navigation Search highlighting
It's different for MadCap's help because they don't use their own MadCap Search engine - they use Elasticsearch.Psider wrote:I think it might have changed, unless Madcap is doing something funky with their own help?
This search has a <span class="search-result-highlighr"> on the bolded terms.
https://help.madcapsoftware.com/flare20 ... q=variable
The same limitation applies to Elasticsearch too though; all the terms on the results page use the same span class, so you can't style them differently.
Re: Top Navigation Search highlighting
Oh right. I read it as they just wanted to change it, not that they wanted different colours.
(When they first introduced the rainbow, I have to admit I turned it off immediately :p )
(When they first introduced the rainbow, I have to admit I turned it off immediately :p )
Re: Top Navigation Search highlighting
Thanks for confirming, guys.
Re: Top Navigation Search highlighting
Having had the same problem (with the MadCap online help being of only limited help), I might have found a not-so-hacky CSS solution.
I noticed that the only bold term on the search results page is the search term, indeed. Hence, it's possible to address that exact bold span in CSS as follows:
My example:
Since the search description (preview) text in div.description doesn't seem to carry over any formats from the original topic (at least by default), there seems to be no risk of highlighting any other bold text unintentionally.
I noticed that the only bold term on the search results page is the search term, indeed. Hence, it's possible to address that exact bold span in CSS as follows:
Code: Select all
div#searchPane._Skins_<your search results skin name>.mc-component b {background-color: <your color>;}
Code: Select all
div#searchPane._Skins_suchergebnisse.mc-component b {background-color: #0000ff;}
You do not have the required permissions to view the files attached to this post.