Triggering a search through URL parameters

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Eric Lachance
Sr. Propeller Head
Posts: 127
Joined: Thu May 13, 2010 11:51 am
Location: Montreal, Quebec, Canada
Contact:

Triggering a search through URL parameters

Post by Eric Lachance »

Hi there!

I was wondering how to trigger a search (the search pane open, with results) via CSH call. The Flare manual says something about doing it from an application, but I just want to be able to provide a link to a user (or a colleague) that gives them the search results directly.

Does anyone know how to do this?

E.g. /Default_CSH.html#q=searchterm , or something of the sorts.
Eric Lachance
Technical Trainer
Objectif Lune Inc.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Triggering a search through URL parameters

Post by LTinker68 »

Flare Help wrote:In the following examples, "MyWebHelp" is the main entry file name, "World Cup Standings" is the search string, and "1000" is the identifier value (the first topic found in the search will not be opened automatically):

Code: Select all

Code:
<a href="MyWebHelp_CSH.htm?World Cup Standings#1000" target="MCWebHelp">Open the Help system</a>

URL:
http://my.website.com/MyWebHelp_CSH.htm?World Cup Standings#1000
In the following example, "MyWebHelp" is the main entry file name, "World Cup Standings" is the search string, "FirstPick" indicates that the first topic found in the search will open automatically, and "MyTopic" is the identifier name:

Code: Select all

Code:
<a href="MyWebHelp_CSH.htm?World Cup Standings|FirstPick#MyTopic" target="MCWebHelp">Open the Help system</a>

URL:
http://my.website.com/MyWebHelp_CSH.htm?World Cup Standings|FirstPick#MyTopic 
In the following example, "MyWebHelp" is the main entry file name, "World Cup Standings" is the search string, "FirstPick" indicates that the first topic found in the search will open automatically, "MyTopic.htm" is the destination file name, and "MySkin" is the name of the skin:

Code: Select all

Code:
<a href="MyWebHelp_CSH.htm?World Cup Standings|FirstPick#MyTopic.htm|MySkin" target="MCWebHelp">Open the Help system</a>

URL:
http://my.website.com/MyWebHelp_CSH.htm?World Cup Standings|FirstPick#MyTopic|MySkin
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Eric Lachance
Sr. Propeller Head
Posts: 127
Joined: Thu May 13, 2010 11:51 am
Location: Montreal, Quebec, Canada
Contact:

Re: Triggering a search through URL parameters

Post by Eric Lachance »

Oops, I guess I missed the fact that this section was collapsed when I was reading the CSH Calls for developers the first time!

Thanks for reminding me to RTFM, Lisa :)
Eric Lachance
Technical Trainer
Objectif Lune Inc.
mymojo
Propeller Head
Posts: 28
Joined: Thu Aug 28, 2008 4:12 pm

Re: Triggering a search through URL parameters

Post by mymojo »

I'm having problems linking to the file directly while maintaining the TOC in the left pane. I want to link to the file directly, but not have to go through the search string to get there. (examples below using dummy names "mywebsite, MyManual, MyTopic" and "..." to signify "http://www.")

I tried:
...mywebsite.com/help/MyManual_CSH.htm#MyTopic.htm

But it doesn't go directly to that topic, just defaults to the homepage.

But if I try:

...mywebsite.com/help/MyManual_CSH.htm?MyTopic|FirstPick#MyTopic.htm

I get the correct topic, but the left pane shows the search results, not the toc. Is there any way to link to the topic directly without going through the search? My hunch is that MyTopic.htm isn't registering at all, but FirstPick is displaying the first in the list, which happens to be the correct file.

I'd love to just provide my developer with unique url names without having to go through the trouble of creating a header and alias file (why do this if each topic has a unique url already?)

Any help would be greatly appreciated!
Eric Lachance
Sr. Propeller Head
Posts: 127
Joined: Thu May 13, 2010 11:51 am
Location: Montreal, Quebec, Canada
Contact:

Re: Triggering a search through URL parameters

Post by Eric Lachance »

mymojo,

Is your page directly in the root of your webhelp, or is it in a subfolder?

For example, if your real MyTopic.htm file is located in mywebsite.com/help/Content/myfolder/MyTopic.htm , then you need to specify that folder.

I'm not sure if you need to specify the /content/ because I don't use it, but this should work:

mywebsite.com/help/MyManual_CSH.htm#Content/myfolder/MyTopic.htm
Eric Lachance
Technical Trainer
Objectif Lune Inc.
mymojo
Propeller Head
Posts: 28
Joined: Thu Aug 28, 2008 4:12 pm

Re: Triggering a search through URL parameters

Post by mymojo »

Ah that worked! That helped me understand that I was on the right path.

What was also hitching me up was that I was behind security and I needed to change my "http" to an "https" for it to work correctly.

Thank you!
Post Reply