Add title to <head> element in WebHelp

ann.jensen
Posts: 194

Add title to <head> element in WebHelp

Thu Sep 21, 2017 2:15 pm

Hi,
I have just used the webhelp.fragment.head parameter to add a Title to my webhelp responsive output. I added

Code: Select all

<title>System Name</title>
to a HTML file and associated the file with webhelp.fragment.head
This works fine for index.html.
However, when I use the Search functionality it is appending System Name to all search results listed (with no space).
Is this as expected?
Thanks in advance,
Ann
radu_pisoi
Posts: 302
Location: Craiova

Re: Add title to <head> element in WebHelp

Fri Sep 22, 2017 2:15 pm

Hi,

I don't think this is an issue.

The webhelp.fragment.head fragment is used to inject custom HTML content into the head section. In your case, a <title>System Name</title> element will be injected in all generated HTML files. Please note that this custom title will duplicate the existing title generated from the topic's title.

On the other hand, the WebHelp search indexer will collect the topic title from html/title element. So, this is the reason why the custom title, System Name, is appended to all search items displayed in the search page.

Could you provide us more details about your use case? Maybe we can help you to find other solution.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ann.jensen
Posts: 194

Re: Add title to <head> element in WebHelp

Fri Sep 22, 2017 2:28 pm

Hi,
I guess I just want a Title for the landing page i.e. index.html.
Regards,
Ann
ann.jensen
Posts: 194

Re: Add title to <head> element in WebHelp

Mon Sep 25, 2017 10:35 am

Hi,
Just to clarify. I was trying to add a Title for the webhelp landing page i.e. Index.html along with a Favicon so that my initial browser tab is populated with icon and title.
This has a knock-on effect of the index page title being appended to each search result which I don't really want.
Is there any other way that I can achieve what I want?
Thanks in advance,
Ann
radu_pisoi
Posts: 302
Location: Craiova

Re: Add title to <head> element in WebHelp

Mon Sep 25, 2017 10:50 am

Hi,

To set a title for the main page it should be enough to specify a title in the DITA map. Something like:

Code: Select all

<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>A List of NASA Space Videos</title>
   ...
</map>


You can add a custom favicon to your WebHelp system by simply using the webhelp.favicon parameter in the transformation scenario. See the
Adding a Favicon in WebHelp Systems topic from our documentation.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest