Use navtitle for topic title
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 47
- Joined: Thu Aug 27, 2015 9:28 pm
Use navtitle for topic title
Hi,
Just wondering if there is an easy way to grab the topics navtitle from that map and use that in the topics heading.
It works for the toc. I need the toc heading and the topic heading to match.
Thanks
Arron
Just wondering if there is an easy way to grab the topics navtitle from that map and use that in the topics heading.
It works for the toc. I need the toc heading and the topic heading to match.
Thanks
Arron
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Use navtitle for topic title
Hi Aaron,
The navtitle is only used in the table of contents and when links are made to the topic. So by default it does not override the actual title presented when the HTML topic is opened.
There may be a way to achieve what you want. Let's say in the DITA Map you have a topic reference looking like this:
If you publish the DITA Map to plain HTML5 or XHTML output and you set the "clean.temp" parameter to "no", in the transformation temporary files folder the topic's content will look something like this:
so when the XSLT stylesheets which produce the HTML output are applied over the topic they have this information in the topic file.
For example for HTML5-based outputs this XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/plugins/org.dita.html5/xsl/topic.xsl
has this XSLT template:
which could also look at the titlealts/navtitle when deciding the <h1> content.
Regards,
Radu
The navtitle is only used in the table of contents and when links are made to the topic. So by default it does not override the actual title presented when the HTML topic is opened.
There may be a way to achieve what you want. Let's say in the DITA Map you have a topic reference looking like this:
Code: Select all
> <topicref href="topics/introduction.dita" locktitle="yes">
<topicmeta>
<navtitle>ABCDEF</navtitle>
</topicmeta>
</topicref>
Code: Select all
<topic..........>
<title............>Original Title</title>
<titlealts class="- topic/titlealts ">
<navtitle>ABCDEF</navtitle>
</titlealts>
For example for HTML5-based outputs this XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/plugins/org.dita.html5/xsl/topic.xsl
has this XSLT template:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/topic ')]/*[contains(@class, ' topic/title ')]">
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<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