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.
Triggering a search through URL parameters
-
- 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
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):
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#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, "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" target="MCWebHelp">Open the Help system</a> URL: http://my.website.com/MyWebHelp_CSH.htm?World Cup Standings|FirstPick#MyTopic
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
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
- 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
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
Thanks for reminding me to RTFM, Lisa
Re: Triggering a search through URL parameters
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!
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!
-
- 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
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
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
Re: Triggering a search through URL parameters
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!
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!