Page 1 of 1
First item in topic <head>
Posted: Mon Jun 27, 2016 6:40 pm
by kmank
Hello,
For webhelp output, I am in need to place a meta tag as the very first item in the <head> of a topic:
<head><meta NEED TO INSERT HERE /><meta name="description"...
OF course, this would have to occur in each topic, but I cannot locate any place in dita2webhelp.xsl.
Can anyone please point to the correct location to make this happen?
Re: First item in topic <head>
Posted: Wed Jun 29, 2016 9:16 am
by radu_pisoi
Hi,
Could you give us more details about your situation?
What version of oXygen are you using? What type of Webhelp are you trying to customize (Webhelp Classic or Webhelp Responsive)?
Re: First item in topic <head>
Posted: Wed Jun 29, 2016 4:08 pm
by kmank
Sure. We are using oXygen 17.1 with plans to update to 18. We are using WebHelp classic with customization to the skin.
Re: First item in topic <head>
Posted: Wed Jun 29, 2016 4:50 pm
by radu_pisoi
A solution is to modify the stylesheet:
Code: Select all
{oXygenInstallDir}/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/xsl/dita/desktop/fixup.xsl
This stylesheet is designed to filter/fix the original content produced by DITA-OT. So, in this stylesheet you can search for the 'generateHeadContent' template which is responsible for generating the head of every HTML page. Please modify this template in order to add your additional meta tag.
Please change
{oXygenInstallDir}/frameworks/dita/DITA-OT with
{oXygenInstallDir}/frameworks/dita/DITA-OT2x if you are using DITA-OT 2.x for publishing.
Re: First item in topic <head>
Posted: Wed Jun 29, 2016 4:58 pm
by kmank
Great info to know. Thanks, Radu!