Page 1 of 1
Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 9:02 am
by rhofitz
Hi,
We have links to topics outside our Flare projects. To insert the link, we use the Insert HyperLinks Dialog box, select External Topic and then type in the the following path:
Code: Select all
/help/topic/com.openedge.pdt.getstart.help/html/copyright.htm
After I generate the WebHelp, and view the source for the generated HTML, the href is as follows:
Code: Select all
<a href="../../help/topic/com.openedge.pdt.getstart.help/html/copyright.htm">
I want Flare to stop adding the ../.. to the path.
Does anyone have any ideas?
Thanks,
Rhonda Fitzgerald
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 9:21 am
by RamonS
You could try inserting the link as a link to a web page and specify the URL.
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 9:43 am
by LTinker68
rhofitz wrote:I want Flare to stop adding the ../.. to the path.
If it's an external link then you need an absolute path, e.g.,
http://www.yourcompany.com/help/topic/c ... yright.htm. You gave it a relative path, so Flare is actually doing the correct thing by adding the ../../. Selecting "External Topic" doesn't really tell Flare anything -- it just changes the options it gives you in the screen.
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 12:26 pm
by rhofitz
RamonS wrote:You could try inserting the link as a link to a web page and specify the URL.
I worked with T.S a bit on this today. This is one of the things we tried. It didn't work. I am not actually trying to go to a Web page. I am linking to an .htm file outside of this project. The workaround was to insert a javascript:
Code: Select all
<a onClick="window.open ('/help/topic/com.openedge.pdt.getstart.help/html/copyright.htm','_self');">
Flare does not add the paths in the HTML output when this is done.
We are creating these links for Eclipse help (to do cross-help plugin links). Eclipse requires the links to be setup a certain way. The newest and recommended way (which I just found out) is to use PLUGINS_ROOT (instead of /help/topic/) For example:
Code: Select all
PLUGINS_ROOT/com.openedge.pdt.getstart.help/html/copyright.htm
So, I tried entering this into the hyperlink db and Flare does not add the ../../
If I precede it with a slash:
Code: Select all
/PLUGINS_ROOT/com.openedge.pdt.getstart.help/html/copyright.htm
Then, Flare DOES add the ../../ in the output. So, its that first slash that is triggering Flare to add the ../../ to the code. Fortunately, if I use PLUGINS_ROOT, then I don't need the first slash and the links will work inside of Eclipse.
Another caveat to this is when I add this same hyperlink on a master page (which is what I am trying to do in this case), Flare changes it to the following in the HTML output:
Code: Select all
<a href="../Resources/MasterPages/PLUGINS_ROOT/com.openedge.pdt.getstart.help/html/copyright.htm">copyright</a>
So, there seem to be a couple of different issues going on. (1) An external topic link that begins with a slash causes Flare to add ../../ to the output code and (2) when used on a master page Flare adds paths to the code.
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 12:59 pm
by LTinker68
Hmmm. See if you can create a variable that contains the path you want, then insert the variable name in the correct spot in the masterpage. Hopefully Flare will treat the value of the variable as a string and therefore won't do anything to it. I've never actually tried putting a variable as a property in a tag, so I'm not sure it'll work.
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 1:04 pm
by RamonS
You could also put the files exactly where Flare wants them to be. Giving in is often the smarter way.
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 1:12 pm
by LTinker68
I don't know what Eclipse is, but if it requires files to be in a specific location, then I'm betting that won't work.
Re: Flare is adding relative paths to external topic hyperlinks
Posted: Tue Jun 17, 2008 1:24 pm
by RamonS
As far as I know Eclipse is a development environment. And if it is so demanding that some files are in a specific place one could make a copy.