Page 1 of 1

Webhelp output - altering the output of productTitle

Posted: Wed Apr 09, 2014 5:17 pm
by Rodrik
Is there any way to get the webhelp output to wrap the contents of the <booklibrary>, <mainbooktitle>, <booktitlealt> elements in separate spans/divs so that they can be more easily formatted?

Currently all three are concatenated into one <h1>:

Code: Select all

<div id="productTitle"><h1>
Book Library
Main Book Title
Book Title Alt</h1><div class="framesLink"><a href="index_frames.html" id="oldFrames"><img src="oxygen-webhelp/resources/img/frames.png" alt="With Frames" border="0" /></a></div></div>
Regards

Rodrik

Re: Webhelp output - altering the output of productTitle

Posted: Thu Apr 10, 2014 3:50 pm
by sorin_ristache
Hi Rodrik,

We'll take it as an enhancement request for the next version of Oxygen. Each element of the bookmap file inside booktitle will be turned into an XHTML span element with a class attribute borrowed from the DITA class value. For example if the bookmap file has the title:

Code: Select all

  <booktitle>
<booklibrary>Book Library</booklibrary>
<mainbooktitle>Main Book Title</mainbooktitle>
<booktitlealt>Book Title Alt</booktitlealt>
</booktitle>
then the title in the Webhelp page will be:

Code: Select all

  <h1>
<span class="booktitle">
<span class="booklibrary">Book Library</span>
<span class="mainbooktitle">Main Book Title</span>
<span class="booktitlealt">Book Title Alt</span>
</span>
</h1>
You can easily format this title, for example hide the booklibrary and the booktitlealt as below, with a custom CSS that you set in the args.css parameter of the Webhelp transformation:

Code: Select all

.booklibrary, .booktitlealt {
display:none;
}
Please contact us by email at support(at)oxygenxml(dot)com to give you the modifications that you need to apply (two modified XSLT files that will overwrite two stock Oxygen XSLT files) to get the title that you want in the Webhelp pages, if you don't want to wait until the official release of the next Oxygen version.


Regards,
Sorin

Re: Webhelp output - altering the output of productTitle

Posted: Thu Apr 10, 2014 8:33 pm
by Rodrik
That's great -- thank you very much. You guys are incredibly responsive.

I'll be emailing you.

Regards

Rodrik

Re: Webhelp output - altering the output of productTitle

Posted: Fri Apr 11, 2014 9:47 am
by sorin_ristache
Hi Rodrik,

I just replied to your email with the modified files that will allow hiding or styling each bookmap title component. These modifications will go in the next version of Oxygen anyway.

Please let us know if it does not work for you.


Regards,
Sorin