Setting a new <Base> for Relative Links

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Cwestpha
Propeller Head
Posts: 49
Joined: Wed Jun 01, 2011 8:31 am

Setting a new <Base> for Relative Links

Post by Cwestpha »

Does anyone have an HTML5 output in which they have managed to use the <base> (http://webdesign.tutsplus.com/articles/ ... -cms-21399) element in the topic <head> to make all relative links refer to a higher directory? I have a large amount of self referential imported content that will be in several subdirectories. When one file links to another, it tries to go even deeper to directories that don't exist.

Example

Topic A is at Content\pies\cherry\TopicA.htm
Topic B is at Content\cakes\chocolate\TopicB.htm

File A imports with content such as <a href="Content/cakes/chocolate/TopicB.htm">See Topic B</a>
The hyperlink logically attempts to resolve to "Content/pies/cherry/Content/cakes/chocolate/TopicB.htm" which of course returns nothing.

I have tried manually inserting <base href="../../.." /> which fixes the problem in raw html, but after building HTML5 output in Flare, all topics have this stripped out and the links resolve too deeply as illustrated above.

I have tried inserting this in the Advanced options in the Target but it is ignored, possibly because it causes an "Invalid XML" issue on the Target.

Anyone else doing this or have idea for this? I cannot manually change the existing URLs as there are hundreds and the are dynamically generated outside of Flare.
Post Reply