Remove file path from search results

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
techdoku26
Jr. Propeller Head
Posts: 3
Joined: Fri May 20, 2016 6:11 am

Remove file path from search results

Post by techdoku26 »

Hi,

In my HTML5 output, the file path for each topic appears in the list of search results. Is there any way to remove this? I am using Flare version 11.

Thanks!
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: Remove file path from search results

Post by rob hollinger »

This link is handled by the skin.
Open the skin to the Styles tab
Under the Search Results group, locate Search Results Path.
Set the layout to Display: none

This will remove the path links.
Additional information on skins and styles can be found here for Flare 11
http://help.madcapsoftware.com/flare11/ ... _Skins.htm
Rob Hollinger
MadCap Software
techdoku26
Jr. Propeller Head
Posts: 3
Joined: Fri May 20, 2016 6:11 am

Re: Remove file path from search results

Post by techdoku26 »

Perfect, thank you so much!
aneedell
Propeller Head
Posts: 40
Joined: Tue Jun 19, 2012 10:33 am

Re: Remove file path from search results

Post by aneedell »

I looked for the option to "Set the layout to Display: none" but I don't see it. I am using a tri-pane skin. In the Skin Editor, I select Styles > Search Results > Search Result Path, but the only option is for Font. Is the option that Rob noted (Display:none) located elsewhere?
kel322
Propeller Head
Posts: 34
Joined: Tue Jan 03, 2017 12:56 pm

Re: Remove file path from search results

Post by kel322 »

Hi @aneedell,
I came across the same issue. It seems like Flare took this option out of the skin (I'm using 2017 r3 -- not sure how 2018 handles this). Through using the inspect tool in Chrome and viewtopic.php?f=12&t=19584, I was able to work around this.

You need to override the output stylesheet for the skin and set this particular element to have a display of none.

To do this, first create a stylesheet named skin.css (you could technically name it whatever you want, but you would then just have to make sure your other code matches. You should be able to do this within Flare, but you will have to delete the junk that Flare adds to it. The only thing in this stylesheet should be what I have below. I'm assuming this is going to be the same across the board, but if for some reason, it doesn't work for you, take a look with Chrome's inspect tool.

Code: Select all

#resultList .url cite
{
	display: none; 
}
Next, add a script to your skin file that calls your new stylesheet. You add scripts by opening the skin, clicking on the Toolbar tab, and then clicking the edit button on the right side of the display. The code should be:

Code: Select all

$('<link>')
	.appendTo($('head'))
	.attr({type: 'text/css', rel: 'stylesheet'})
	.attr('href', 'Content/Resources/Stylesheets/skin.css');

$('<link>')
	.appendTo($('head'))
	.attr({type: 'text/css', rel: 'stylesheet'})
	.attr('href', 'content/resources/stylesheets/skin.css');
Finally, make sure that your target settings are compatible, for me it was unchecking the "Exclude content not linked directly or indirectly from the target". The post referenced above has more info.
aneedell
Propeller Head
Posts: 40
Joined: Tue Jun 19, 2012 10:33 am

Re: Remove file path from search results

Post by aneedell »

Hello, @kel322.
Thanks for your response: the solution works as you described!
The odd part is the need to disable the "Exclude content not linked..." option. When it remains enabled, the published output excludes the skin.css file even though it is referenced by the embedded Javascript; and in this case, the solution does not work. My problem is that the "Exclude content not linked..." option is necessary. It appears that my only options are to either (1) set the font color to white in the Search Result Path, or (2) @include skin.css in my main stylesheet to force its inclusion (I'm assuming that it will force it). It's also odd that MadCap decided to eliminate the 'Display' option. I'll probably take the kluge option and set the font color to white. Again, thanks for your reply!
Albert
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Remove file path from search results

Post by NorthEast »

aneedell wrote:The odd part is the need to disable the "Exclude content not linked..." option.
The Exclude content not linked... setting will not detect links in javascript.
(I completely avoid using this setting, and always use conditions to exclude/include content.)

Including a link to skin.css anywhere in your project will get round the problem.
kel322
Propeller Head
Posts: 34
Joined: Tue Jan 03, 2017 12:56 pm

Re: Remove file path from search results

Post by kel322 »

Thanks for such a great resource, Dave. I have used your documentation site more than once; it's wonderful.

Albert: Out of curiosity, I added a link to the skin stylesheet in the head of one of my topics and checked the "Exclude content not linked ..." option in the target. And as Dave noted, it works. No file paths in my search results!

This is another great work around because there are some topics in my project that are intended for just print output that I do not want to be indexed and found in my search results.
aneedell
Propeller Head
Posts: 40
Joined: Tue Jun 19, 2012 10:33 am

Re: Remove file path from search results

Post by aneedell »

Thanks for the input, Dave, that completes the explanation. I'll follow the suggestion to add a link to skin.css in some topic and resolve the problem that way. And, I'll take this occasion to concur with kel322 about your website -- it's a great resource, and I appreciate your support of the entire Flare community. Many thanks to both of you for your help on this issue!
Post Reply