Display URL for the current topic in HTML5 output?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
todd.richardson
Sr. Propeller Head
Posts: 184
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

Display URL for the current topic in HTML5 output?

Post by todd.richardson »

Hi,

We install HTML5 Help locally with our software. A subset of our user base does not have a web browser installed on their dev machine. For these users, we provide a very simple frame in which the local Help is displayed. We're looking for a way to display the URL of the current topic somewhere in the local HTML5 output, either through the skin or master page, so that it can be easily copied/pasted into correspondence with our Support team when a doc issue needs to be reported.

Has anyone achieved this, or does anyone have suggestions for how this might be accomplished?

Thanks,
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
zappy0
Propeller Head
Posts: 39
Joined: Fri Mar 25, 2016 2:19 pm

Re: Display URL for the current topic in HTML5 output?

Post by zappy0 »

Because you install HTML5 Help locally, I assume the URL is something like file:///C:/application/help/topic.html.

You might be able to add some inline javascript to your master page. Something such as:

Code: Select all

    <body>
        <p><b>[%=Primary.docTitle2%]</b></p>
		[b]<p id="urlLine">
		<script>document.getElementById("urlLine").innerHTML = "The full URL of this page is: " + window.location.href;</script>
		</p>[/b]
        
        <MadCap:bodyProxy />
    </body>
This would add the page URL to the top of each topic that uses the master page. You mentioned you display the help in a "very simple frame" so this might not work if the frame is not capable of running javascript.

Good luck!
todd.richardson
Sr. Propeller Head
Posts: 184
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

Re: Display URL for the current topic in HTML5 output?

Post by todd.richardson »

Thanks @zappy0. Worth a try.
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
Post Reply