Hiding entries from the main_page_toc of a tree transformation
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 8
- Joined: Thu Jun 13, 2024 5:15 pm
Hiding entries from the main_page_toc of a tree transformation
Hi,
We have a main ditamap with several submaps. I want to be able to hide some entries or entire subtrees from the tree transformation scenario. Similar to hiding tiles in the tiles transformation scenario.
I have tried using the display=none with many of the classes. Athough I can hide all the topic titles and short descriptions, I cannot hide the empty accordeon itself.
Is there a way of hiding the expandable accordeon?
Kind regards
Rosaria
We have a main ditamap with several submaps. I want to be able to hide some entries or entire subtrees from the tree transformation scenario. Similar to hiding tiles in the tiles transformation scenario.
I have tried using the display=none with many of the classes. Athough I can hide all the topic titles and short descriptions, I cannot hide the empty accordeon itself.
Is there a way of hiding the expandable accordeon?
Kind regards
Rosaria
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Hiding entries from the main_page_toc of a tree transformation
Hi Rosaria,
Is this about customizing the Oxygen DITA to WebHelp transformation? Or do you have your own DITA to HTML customizations?
Can you maybe add a screenshot with the stuff that you want to hide?
Regards,
Radu
Is this about customizing the Oxygen DITA to WebHelp transformation? Or do you have your own DITA to HTML customizations?
Can you maybe add a screenshot with the stuff that you want to hide?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Thu Jun 13, 2024 5:15 pm
Re: Hiding entries from the main_page_toc of a tree transformation
Hi Radu
yes, it is about the Oxygen Tree transformation, which we have adapted a little bit to our corporate identity.
Here is a screenshot of the tree and the hidden texts:
Thank you for your help.
Kind regards
Rosaria

yes, it is about the Oxygen Tree transformation, which we have adapted a little bit to our corporate identity.
Here is a screenshot of the tree and the hidden texts:
image.png
As you can see, I have managed to hide the texts (title, shortdesc) of the topics but could not get rid of the accordion.Thank you for your help.
Kind regards
Rosaria
You do not have the required permissions to view the files attached to this post.
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Hiding entries from the main_page_toc of a tree transformation
Post by julien_lacour »
Hello,
The simplest solution is to mark the submap with @toc="no attribute":
But this will remove the entry from the tree and the header.
If you just want to remove it from the tree you can do something similar to this:
Then in your custom CSS stylesheet you just need to match the entry having the "no-tree" class:
Regards,
Julien
The simplest solution is to mark the submap with @toc="no attribute":
Code: Select all
<map>
<title>Main</title>
<mapref href="first/first.ditamap"/>
<mapref href="second/second.ditamap"/>
<mapref href="third/third.ditamap" toc="no"/>
<mapref href="fourth/fourth.ditamap"/>
</map>
If you just want to remove it from the tree you can do something similar to this:
Code: Select all
<map>
<title>Main</title>
<topichead navtitle="First">
<mapref href="first/first.ditamap"/>
</topichead>
<topichead navtitle="Second">
<mapref href="second/second.ditamap"/>
</topichead>
<topichead navtitle="Third" outputclass="no-tree">
<mapref href="third/third.ditamap"/>
</topichead>
<topichead navtitle="Fourth">
<mapref href="fourth/fourth.ditamap"/>
</topichead>
</map>
Code: Select all
.wh_main_page_toc_accordion_header:has(.no-tree) {
display: none;
}
Julien
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