Adding Outputclass to Topic Head

Questions about XML that are not covered by the other forums should go here.
dgallo
Posts: 78

Adding Outputclass to Topic Head

Wed Feb 01, 2017 9:26 pm

I would like to add an outputclass to certain topic heads in my ditamap. My reason is that I would like to apply a different style to the topic head's title that have this outputclass assigned.

I have tried to add an outputclass to the topichead element as well as to the navtitle element of the topichead topicmeta, but in the html the outputclass is not retained.

I am using Oxygen 18.1 with the responsive webhelp.
bogdan_cercelaru
Posts: 188

Re: Adding Outputclass to Topic Head

Thu Feb 02, 2017 6:38 pm

Hello,

I've tested with Oxygen v18.1 by adding the following code to the "flowers.ditamap" sample:

Code: Select all

<topichead navtitle="Care and Preparation" outputclass="my_head_class">
      <topicref href="topics/care.dita" />
</topichead>


In the generated "index.html" file I've found the following HTML fragment:

Code: Select all

<span class="my_head_class"><a href="topics/care.html">Care and Preparation</a></span>

This fragment appear in the "wh_main_page_toc" and in the "wh_top_menu" sections.
If it doesn't work for you, please send us an email with a sample DITA Map at support@oxygenxml.com.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dgallo
Posts: 78

Re: Adding Outputclass to Topic Head

Thu Feb 02, 2017 8:15 pm

I see it in the index.htm page, but it does not appear in the following sections: .wh_content_area > .wh_side_toc or in the h1 of .wh_topic_content body, which is where I need it.
bogdan_cercelaru
Posts: 188

Re: Adding Outputclass to Topic Head

Mon Feb 06, 2017 6:22 pm

Hello,

To obtain the outputclass in the "h1" of ".wh_topic_content body", you have to set the outputclass attribute to the "<title/>" element in the corresponding DITA topic.
I've registered an issue in our issue tracking system so that the outputclass to be added in the ".wh_content_area > .wh_side_toc" when the outputclass attribute is set to the topichead element.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 1 guest