Home Forums General XMetaL Discussion Structure view: how to set the initial collapse level? Reply To: Structure view: how to set the initial collapse level?

Derek Read

Reply to: Structure view: how to set the initial collapse level?

Perhaps a different solution would be to modify the Structure View CSS file for the document type to hide elements that you do not want displayed?
I'm not sure if you really mean collapse (which would require scripting) or permanently hide (not display) particular elements?
If you have large enough documents that Structure View is really useful to you I suspect that means you are primarily using it for navigation?
In other words, you collapse them but perhaps only because that is the only feature you know of but might not really be what you want.

The CSS files are located here for each DITA document type:
C:Program FilesXMetaL 9.0AuthorDITAXACs_ditabase_structure.css
Note: On 64-bit machines adjust the path to C:Program Files (x86)

So for the DITA 1.2 topic.dtd the Structure View CSS file is this:
C:Program FileXMetaL 9.0AuthorDITAXACs1.2topictopic_ditabase_structure.css

Since it seems you want to display very few elements (at least as your default state) you could hide everything and then selectively start adding stuff back. In order to display an element its ancestor must be visible. Here's an example that hides everything except title elements for both the topic and section elements:

[code]* { display: none; font-family: Arial; font-size: 10px; margin: 0px; padding: 0px}
topic {display: block}
body {display: block}
section { display: block}
title {display: inline}
topic > title {font-size: 14px; font-weight: bold}[/code]

Here's the same thing for DITA Concepts:
[code]* { display: none; font-family: Arial; font-size: 10px; margin: 0px; padding: 0px}
concept {display: block}
conbody {display: block}
section { display: block}
title {display: inline}
concept > title {font-size: 14px; font-weight: bold}[/code]

Reply

Products
Downloads
Support