Page 1 of 1
Customizing "webhelp.fragment.header"?
Posted: Thu May 23, 2024 1:13 pm
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
Re: Customizing "webhelp.fragment.header"?
Posted: Thu May 23, 2024 1:58 pm
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>
Re: Customizing "webhelp.fragment.header"?
Posted: Tue May 28, 2024 4:59 pm
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
Re: Customizing "webhelp.fragment.header"?
Posted: Tue May 28, 2024 5:15 pm
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
Re: Customizing "webhelp.fragment.header"?
Posted: Thu May 30, 2024 2:18 pm
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
Re: Customizing "webhelp.fragment.header"?
Posted: Fri May 31, 2024 6:35 pm
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
