Absolute path changes into relative path

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
CGID
Jr. Propeller Head
Posts: 2
Joined: Sun Sep 09, 2007 2:29 am
Location: Noordwijk zh
Contact:

Absolute path changes into relative path

Post by CGID »

Hello collegues,

I'm an unfrequent user of Flare (3.1) and have the following problem that I cannot solve by reading the Help.
In Flare I enter an absolute path (what my customer wants) and after generating the HTML-files that path is changed by Flare into a relative path.
Can anyone tell me if this is Flare (bad luck) or can I do something about it to avoid Flare from this behaviour and that Flare leaves it as I want it?
Please no technical answers, because I am a information designer (outsites of applications, no source).

Example:
In Flare I link the file 'pijl_start.jpg' to 'file:///F:/Klanten/2009/CGID/Content/Portal/image/pijl_start.jpg'. (file:/// is added by the system)
In the HTML-file it is presented as: <img src="../../image/pijl_start.jpg"
The path I expect it to show is: <img src="CGID/Portal/image/pijl_start.jpg"

Because I found out that normally the path behind the folder 'Content' is added in the string, but it seems to be cut off on a maximum of one level.
I avoud the standerd folders like Resources etc. because my customers cannot handle this strings.

So after this explanation the question: Is there a setting in Flare I overlooked?

Best regards,

Cees Geuze
Netherlands
http://www.cgid.nl
info@cgid.nl
Cees
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Absolute path changes into relative path

Post by KevinDAmery »

First off, are you making HTML help (in other words, a CHM file) or WebHelp (in other words, a number of HTML files, images, etc.)? This forum is for CHM files, which is why I'm asking: if you are making a CHM, whether the path is relative or absolute doesn't matter because everything gets compiled into the CHM and is self contained.

(If you're actually talking about Webhelp that isn't a problem - I'm just trying to make sure we all know what we're talking about.)
Until next time....
Image
Kevin Amery
Certified MAD for Flare
CGID
Jr. Propeller Head
Posts: 2
Joined: Sun Sep 09, 2007 2:29 am
Location: Noordwijk zh
Contact:

Re: Absolute path changes into relative path

Post by CGID »

Hi Kevin,

I'm talking about WebHelp (in other words, a number of HTML files, images, etc.)!
And as the group was called Microsoft HTML Help, that is just what I'm generating. So I thought I was in the right board.
Can you advise me what board I should attend to..?

Thanks,

Cees
Cees
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Absolute path changes into relative path

Post by KevinDAmery »

Microsoft HTML Help is what produces a CHM (the extension stands for Compiled HTML).

The forum you are looking for is here:

http://forums.madcapsoftware.com/viewforum.php?f=9
Until next time....
Image
Kevin Amery
Certified MAD for Flare
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Absolute path changes into relative path

Post by NorthEast »

I would raise this as a bug.
https://www.madcapsoftware.com/bugs/submit.aspx

Flare does change 'file://...' links to images on the C: drive to relative paths.

I would understand it doing that for files inside the project folders (inside 'Content'), but it also does it for files outside the project. When you build a project, Flare will tell you that the link points outside the project, but yet it still converts the absolute link to a relative link - if it left it alone then the link would actually work (on your own PC at least).

Anyway, I think the only way to get an absolute image link to work is to store the image on another drive (anything other than C: should work), or on a webserver (i.e. use an 'http://' link).
JasonSTI
Sr. Propeller Head
Posts: 110
Joined: Mon Jan 07, 2008 11:34 am

Re: Absolute path changes into relative path

Post by JasonSTI »

Could you try using javascript to insert the link, so that it is added when the HTML is rendered, rather than when the CHM is compiled?

<script type="text/javascript">
<!--
document.write('<img src="file:///F:/Klanten/2009/CGID/Content/Portal/image/pijl_start.jpg" />');
-->
</script>

Not sure if that would work, but would be a start. I havn't worked with loading images remotely like that.

If it is just a file you want to open the the drive, that's easier. Use a HTML Object and change the link to a hhClick() script.

<OBJECT id="aOpenFile" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" codebase="hhctrl.ocx#Version=4,73,8412,0">
<PARAM name="Command" value="ShortCut" />
<PARAM name="Text" value="Text:Shortcut" />
<PARAM name="Item1" value=",FILENAME.EXT," />
</OBJECT>

<a href="javascript:aOpenFIle.HHClick()">Shortcut Text</a>

Just things to try.
Post Reply