Define the title for the default htm file

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
wfranz
Propeller Head
Posts: 10
Joined: Wed Dec 06, 2017 9:37 am

Define the title for the default htm file

Post by wfranz »

One accessibility requirement is that all topics are titled. What is currently driving me crazy is that the default output file, which we name index.html seems to have no way to define the title properly.

First, there seems to be no way to define the title for this file within MadCap Flare itself. So, instead I've tried to modify the file Default.htm within Flare.app\Resources\WebHelp2\Desktop that appears to define how this file is created. I have been able to modify this Default.htm file to define language settings for the main <html> tag, wonderful. However, if I try to define a <title> some things that make zero sense to me happen.

If I remove all <title> definitions the build fails, this actually seems logical so ok good.

If I define a single <title> tag, a <title> tag is created but no matter what I put within <title>Awesome Title Here</title>, after a build the title within it is empty and I'm left with and empty <title></title> definition.

And where it gets craziest, if I define multiple <title> tags, after a build it will keep both <title> tag definitions. The first <title> tag definition is empty, no matter what I define inside it. The second one is defined exactly as defined in Default.htm, so it includes something like <title>Awesome Title Here</title>. But because I have to define more than one to get a non-empty <title> tag, I still have one <title> tag that is empty.

What in the world is going on? How do I get this default topic to have a single <title> defined that actually has a valid value and is not empty?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Define the title for the default htm file

Post by NorthEast »

Why does the default output file need a title?

I'm assuming you're using HTML5 output with either a Side nav or Top nav skin. If so, then you never stay on the default output page, as it immediately opens your initial help topic.

(It's slightly different for the Tripane skin, but that does actually include a title by default - so I'm assuming you're not using Tripane.)
wfranz
Propeller Head
Posts: 10
Joined: Wed Dec 06, 2017 9:37 am

Re: Define the title for the default htm file

Post by wfranz »

Dave Lee wrote:Why does the default output file need a title?

I'm assuming you're using HTML5 output with either a Side nav or Top nav skin. If so, then you never stay on the default output page, as it immediately opens your initial help topic.

(It's slightly different for the Tripane skin, but that does actually include a title by default - so I'm assuming you're not using Tripane.)
This is an excellent question for which I have what is likely a silly answer. Our HTML 5 help systems get run through another system to be deployed externally. One of the accessibility checks that is included is to ensure every page is titled and has a language definition. Unfortunately, since this is a topic file, even if it isn't actually directly used as you mention it also gets considered in this accessibility check, and then fails the check of being titled appropriately.

So, my hope was that I could apply a title during generation of the HTML 5 output. That is when I discovered this perplexing behavior. If it would only allow me to define a title I could pass this admittedly mostly silly accessibility check (silly since it's on a topic that actually is not directly accessed by a user) and move on with my life. The fact that it allows me to define a title but makes the first definition empty and allows the second definition to have content is perplexing.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Define the title for the default htm file

Post by NorthEast »

Ah, so you can't set up the checker to exclude/ignore certain files?

Note that if you edit Default.htm in Flare.app\Resources, then it will only work for builds from your PC, and you'll have to keep changing it after every Flare update.

An alternative method would be to use a post-build event to copy and replace the Default.htm in the output. This is a bit more of a robust solution, especially if you work in a team and need to reliably produce builds from different PCs.
1) Go to your output and make a copy of the Default.htm file.
2) Edit the Default.htm file to add your title.
3) Put the new Default.htm in a shared folder that can be accessed by everyone.
4) Add a post-build event to your target to copy the Default.htm from the shared folder to your output folder.
See: https://help.madcapsoftware.com/flare20 ... Events.htm
wfranz
Propeller Head
Posts: 10
Joined: Wed Dec 06, 2017 9:37 am

Re: Define the title for the default htm file

Post by wfranz »

Thanks I'll give build events a close look to see if I can work these to fit my needs.
Post Reply