Customizing "webhelp.fragment.header"?

Having trouble installing Oxygen XML WebHelp? Got a bug to report? Post it all here.
Frank Ralf
Posts: 466
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Customizing "webhelp.fragment.header"?

Post by Frank Ralf »

Hi,

I am customizing the WebHelp header section using the HTML fragment extension point webhelp.fragment.head. However, this seems to clash with the webhelp.fragment.header extension point which by default includes the header.xml file from the page-templates folder. I did not find any documentation specifically for that extension point.

I had expected a similar mechanism as for the footer section. There, the footer.xml file from the page-templates folder includes the HTML fragment webhelp.fragment.footer like so:

Code: Select all

<whc:include_html href="${webhelp.fragment.footer}"/>
Can I just add similar code to header.xml? Or can/should I change that file directly? I want to keep the implementation as clean and flexible as possible by keeping all my customisations to the HTML fragments without touching default files from the page templates.

Any pointers welcome

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Frank Ralf
Posts: 466
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Customizing "webhelp.fragment.header"?

Post by Frank Ralf »

I solved the problem by using the (undocumented) webhelp.fragment.header extension point in the .opt file instead of webhelp.fragment.head which overrides the header.xml:

Code: Select all

 
 <html-fragments>
      <fragment file="html-fragments/header_extern.xml" placeholder="webhelp.fragment.header" />
 </html-fragments>
 
Frank Ralf
parson AG
www.parson-europe.com
beniamin_savu
Posts: 34
Joined: Fri Jan 22, 2021 11:05 am

Re: Customizing "webhelp.fragment.header"?

Post by beniamin_savu »

Hi,

Thank you for your feedback.

I have added an issue to our internal issue tracker to document the missing 'webhelp.fragment.header' transformation parameter.

Best regards,
Beniamin Savu
Oxygen WebHelp Team
http://www.oxygenxml.com
Frank Ralf
Posts: 466
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Customizing "webhelp.fragment.header"?

Post by Frank Ralf »

Hi Beniamin,

Thanks for following up. In addition, I am not sure whether webhelp.fragment.head should be renamed webhelp.fragment.before.header because AFAIU webhelp.fragment.head is not displayed in the header section, that is, as part of header.xml. (See my post above about the different implementation of webhelp.fragment.footer and footer.xml.)

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
beniamin_savu
Posts: 34
Joined: Fri Jan 22, 2021 11:05 am

Re: Customizing "webhelp.fragment.header"?

Post by beniamin_savu »

Hi,

Both parameters webhelp.fragment.head and webhelp.fragment.header are available in WebHelp Responsive.

The webhelp.fragment.head parameter enables inserting HTML content into the <head> element on all generated WebHelp pages. It allows the possibility to add additional meta elements, CSS file linking, JavaScript file inclusion, and other resources.

The webhelp.fragment.header parameter facilitates inserting HTML content into the <header> element of all generated WebHelp pages. The <header> element is the top element of the WebHelp pages, where the logo and top menu appear.

We will update our documentation to better clarify the purpose and application of these parameters.

Best regards,
Beniamin Savu
Oxygen WebHelp Team
http://www.oxygenxml.com
Frank Ralf
Posts: 466
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Customizing "webhelp.fragment.header"?

Post by Frank Ralf »

Many thanks for the clarification!

I think I mixed up the (invisible) <head> section of a HTML page with the (visible) <header> element. I definitely should upgrade my web knowledge from HTML4 to HTML5 ;-)
Frank Ralf
parson AG
www.parson-europe.com
Post Reply