Header element Customisation on page with specific topic id

Oxygen general issues.
sudhe
Posts: 5
Joined: Sun Oct 13, 2024 6:31 pm

Header element Customisation on page with specific topic id

Post by sudhe »

Hi Folks,
I have been trying to customise the header element with below xsl expression

Code: Select all

*[contains(@class, 'wh_header') and not(contains(@class, 'wh_header_flex_container'))]
which is modifying the header element on all the topic pages.


As topic id cascading to body id in html, i tried the xsl expression

Code: Select all

html[body[contains-token(@id, 'custumID')]][contains(@class, 'wh_header') and not(contains(@class, 'wh_header_flex_container'))]
but is not working.
Please suggest what went wrong here.

Thanks & Regards,
Sudhe
julien_lacour
Posts: 704
Joined: Wed Oct 16, 2019 3:47 pm

Re: Header element Customisation on page with specific topic id

Post by julien_lacour »

Hello,

The default processing for wh_header is using mode="copy_template", if you add it, your template will be used:

Code: Select all

<xsl:template match="*[contains(@class, 'wh_header') and not(contains(@class, 'wh_header_flex_container'))]" mode="copy_template">
You can find an example in our GitHub page: https://github.com/oxygenxml/oxygen-pub ... -in-header

Could you indicate which version of Oxygen you are using and what you are trying to achieve?

Regards,
Julien
Post Reply