Customizing WebHelp Responsive header
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 40
- Joined: Wed Jan 29, 2014 4:30 pm
Customizing WebHelp Responsive header
Hi,
we have a custom DITA map DTD, with additional metadata that we want to show in the header in a customized WebHelp Responsive plugin, as part of the title.
For example, we want to display the product name before and the document version after the title's text, and the entire string must be included in the link ('<a href=...>)' element.
Can you please explain how we can achieve this ?
Is there a parameter, an extension-point or an element of the publishing template that we can customize ?
Kind regards,
Pascale
we have a custom DITA map DTD, with additional metadata that we want to show in the header in a customized WebHelp Responsive plugin, as part of the title.
For example, we want to display the product name before and the document version after the title's text, and the entire string must be included in the link ('<a href=...>)' element.
Can you please explain how we can achieve this ?
Is there a parameter, an extension-point or an element of the publishing template that we can customize ?
Kind regards,
Pascale
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Customizing WebHelp Responsive header
Hello,
You can retrieve metedata info from your input map using the macros template components: https://www.oxygenxml.com/doc/versions/ ... gment_file.
You can add content before and after the <whc:webhelp_publication_title> component by expanding it in the HTML Layout files as follows:
This support is available for all whc:* template components.
Supposing you have the following metadata in your DITA map:
You can use the map-xpath macro to retireve the product name and the product version from the DITA map and insert these data before and after the publication title as follows:
Note that you will obtain 3 <a> elements: one for the content before, one for the actual title and one for the content after the title.
You can customize the styles for the added content by providing additional CSS to the WebHelp Responsive transformation: https://www.oxygenxml.com/doc/versions/ ... h-css.html
Regards,
Alin
You can retrieve metedata info from your input map using the macros template components: https://www.oxygenxml.com/doc/versions/ ... gment_file.
You can add content before and after the <whc:webhelp_publication_title> component by expanding it in the HTML Layout files as follows:
Code: Select all
<whc:webhelp_publication_title>
<!-- Content before component content -->
<whc:component_content/>
<!-- Content after component content -->
</whc:webhelp_publication_title>
Supposing you have the following metadata in your DITA map:
Code: Select all
<map>
<title>Growing Flowers</title>
<topicmeta>
<prodinfo>
<prodname>My product</prodname>
<vrmlist>
<vrm version="20.1"/>
</vrmlist>
</prodinfo>
</topicmeta>
.....
</map>
Code: Select all
<whc:webhelp_publication_title>
<span class="wh_publication_title before-title">
<a href="${path(oxygen-webhelp-output-dir)}/index.html">
<span>[<whc:macro value="${map-xpath(/map/topicmeta/prodinfo[1]/prodname/text())}"/>]</span>
</a>
</span>
<whc:component_content/>
<span class="wh_publication_title after-title">
<a href="${path(oxygen-webhelp-output-dir)}/index.html">
<span>[v. <whc:macro value="${map-xpath(/map/topicmeta/prodinfo[1]/vrmlist/vrm[1]/@version)}"/>]</span>
</a>
</span>
</whc:webhelp_publication_title>
You can customize the styles for the added content by providing additional CSS to the WebHelp Responsive transformation: https://www.oxygenxml.com/doc/versions/ ... h-css.html
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 40
- Joined: Wed Jan 29, 2014 4:30 pm
Re: Customizing WebHelp Responsive header
Thanks for your answer, however I need more details.
Do I need a "myCustomWebHelp" plugin or is it feasible simply by creating a new custom publishing template ?
In the later case, in which file should I add the code ?
TIA,
Pascale
Do I need a "myCustomWebHelp" plugin or is it feasible simply by creating a new custom publishing template ?
In the later case, in which file should I add the code ?
TIA,
Pascale
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Customizing WebHelp Responsive header
Hi Pascale,
More specific, that option is available in the "Save Template As..." dialog you obtain when saving (exporting) a publishing template, after you configured your transformation scenario.
I hope this helps.
Regards,
Costin
You do not need to create a custom plugin, you should just use Alin's suggestion in a publishing template.Do I need a "myCustomWebHelp" plugin or is it feasible simply by creating a new custom publishing template ?
In the "header.xml" file, located inside the "page-templates" folder from your custom publishing template folder. In order for the "page-templates" folder to be generated inside the exported publishing template, you should make sure you enable the "Include HTML Layout Files" option when exporting the publishing template from the transformation scenario configuration dialog.In the later case, in which file should I add the code ?
More specific, that option is available in the "Save Template As..." dialog you obtain when saving (exporting) a publishing template, after you configured your transformation scenario.
I hope this helps.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service