Adjusting the text in the header section of WebHelp Responsive output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 114
- Joined: Wed Mar 17, 2010 1:04 pm
Adjusting the text in the header section of WebHelp Responsive output
Hi,
I need to write additional information into the title of the WebHelp Responsive output.
From what I have seen, the software uses the mainbooktitle of a bookmap and the title of a map by default.
I would need to add some static text plus the booktitlealt in case of a bookmap and the value of thecontent attribute of an othermeta element named maptitlealt in case of a map. I've already done this for PDF output, but I am not really sure where to start with the webHelp.
My current idea is to override the generatePageTitle template from the file commonComponentsExpander.xsl.
Is this about right?
Thank you for your help
Susanne
I need to write additional information into the title of the WebHelp Responsive output.
From what I have seen, the software uses the mainbooktitle of a bookmap and the title of a map by default.
I would need to add some static text plus the booktitlealt in case of a bookmap and the value of thecontent attribute of an othermeta element named maptitlealt in case of a map. I've already done this for PDF output, but I am not really sure where to start with the webHelp.
My current idea is to override the generatePageTitle template from the file commonComponentsExpander.xsl.
Is this about right?
Thank you for your help
Susanne
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Adjusting the text in the header section of WebHelp Responsive output
Hi Susanne,
There is no dedicated transformation parameter which could be used to do that, but that could be most probably achieved through an XSLT extension, indeed.
For example, you could look at this custom publishing template on GitHub, which we created and uses an XSLT Extension to add a prefix for each topic page title. Maybe you could use that as a starting point.
Regards,
Costin
There is no dedicated transformation parameter which could be used to do that, but that could be most probably achieved through an XSLT extension, indeed.
For example, you could look at this custom publishing template on GitHub, which we created and uses an XSLT Extension to add a prefix for each topic page title. Maybe you could use that as a starting point.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 114
- Joined: Wed Mar 17, 2010 1:04 pm
Re: Adjusting the text in the header section of WebHelp Responsive output
Hi Costin,
it appears that I wasn't precise enough. I don't want to change the topic title, but the publication title that is displayed above the menu.(see screenshot).
Kind regards
Susanne
it appears that I wasn't precise enough. I don't want to change the topic title, but the publication title that is displayed above the menu.(see screenshot).
WebHelpResponsiveFlower.jpg
Does this also require XSL?Kind regards
Susanne
You do not have the required permissions to view the files attached to this post.
-
- Posts: 145
- Joined: Mon Jun 12, 2017 10:50 am
Re: Adjusting the text in the header section of WebHelp Responsive output
Post by cosmin_andrei »
Hello,
You could do that through a custom HTML fragment, injected into the resulted WebHelp output. The Oxygen WebHelp offers the possibility to both insert custom HTML content into the output and to reference it from a publishing template or a transformation scenario (in this case we are talking about webhelp.fragment.after.logo_and_title parameter).
More details are available in our user-guide:
https://www.oxygenxml.com/doc/versions/ ... -html.html
You could do that through a custom HTML fragment, injected into the resulted WebHelp output. The Oxygen WebHelp offers the possibility to both insert custom HTML content into the output and to reference it from a publishing template or a transformation scenario (in this case we are talking about webhelp.fragment.after.logo_and_title parameter).
More details are available in our user-guide:
https://www.oxygenxml.com/doc/versions/ ... -html.html
Regards,
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
-
- Posts: 114
- Joined: Wed Mar 17, 2010 1:04 pm
Re: Adjusting the text in the header section of WebHelp Responsive output
Hello,
unfortunately, I still don't get this to work the way I want it.
I can add static text, but I need to extract data from the bookmap that is converted.
Therefore, I added the following to my publishing template:
However, the expression is not resolved. Instead, the variable itself is displayed.
Is there a restriction I did not understand?
Kind regards
Susanne
unfortunately, I still don't get this to work the way I want it.
I can add static text, but I need to extract data from the bookmap that is converted.
Therefore, I added the following to my publishing template:
Code: Select all
<parameter name="webhelp.fragment.after.logo_and_title" value="${map-xpath(/bookmap/booktitle/booktitlealt)}"/>
Is there a restriction I did not understand?
Kind regards
Susanne
-
- Posts: 114
- Joined: Wed Mar 17, 2010 1:04 pm
Re: Adjusting the text in the header section of WebHelp Responsive output
Meanwhile, I was able to solve the problem. Apparently, the booktitlealt is already available in the output, but the display property is set to none by default. So I just added this to my WebHelp stylesheet:
I would still be interested to know how I should have used the macro.
Kind regards,
Susanne
Code: Select all
.booktitlealt {
display: inline !important;
}
.booktitlealt::before {
content: " - ";
}
Kind regards,
Susanne
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Adjusting the text in the header section of WebHelp Responsive output
Hello,
A macro can be used in the content of an HTML Fragment file. In your case, the content of the fragment file should be:
You can find more details about macros in our User Manual: https://www.oxygenxml.com/doc/versions/ ... gment_file
The HTML fragment file should be saved in the directory of your publishing template. Then you should reference the fragment file in your publishing template's descriptor file as follows:
You can find more details about referencing the HTML fragment using a Publishing Template in our User Manual: https://www.oxygenxml.com/doc/versions/ ... ublishing_
Regards,
Alin
A macro can be used in the content of an HTML Fragment file. In your case, the content of the fragment file should be:
Code: Select all
<span xmlns:whc="http://www.oxygenxml.com/webhelp/components"> - <whc:macro value="${map-xpath(/bookmap/booktitle/booktitlealt)}"/></span>
The HTML fragment file should be saved in the directory of your publishing template. Then you should reference the fragment file in your publishing template's descriptor file as follows:
Code: Select all
<html-fragments>
<fragment file="fragments/fragment.xml" placeholder="webhelp.fragment.after.logo_and_title"/>
</html-fragments>
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
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