Folding Elements

Post here questions and problems related to editing and publishing DITA content.
catherine
Posts: 158
Joined: Fri Nov 10, 2017 8:16 am

Folding Elements

Post by catherine »

Hi, I am trying to figure out how to set foldable property for DITA elements.

The following are what I did, but not worked for me.
  • Create a folding.css file. The css file defines:

    Code: Select all

    section {
    -oxy-foldable:true;
    -oxy-not-foldable-child: title;
    }
  • Add the sentence in the dita file head

    Code: Select all

    <?xml-stylesheet type="text/css" href="./folding.css"?>
  • Generate a webhelp.
I cannot see the foldable icon on the webhelp. Any thing wrong wih my operation?
ionela
Posts: 400
Joined: Mon Dec 05, 2011 6:08 pm

Re: Folding Elements

Post by ionela »

Hello,

An XML document in the Author mode is rendered using CSS, but that CSS is used just for Author mode not also for the generated WebHelp output.

Unfortunately, there isn't an easy way to add folding elements in WebHelp Responsive output. We have this logged as an improvement request to out issue tracking tool and I've added your vote for it.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
catherine
Posts: 158
Joined: Fri Nov 10, 2017 8:16 am

Re: Folding Elements

Post by catherine »

Hi, Ionela
Thanks for your reply.
I see your document contain an unfold/fold button beside the section title.
Like this page: https://www.oxygenxml.com/doc/versions/ ... ctive.html

How to achive this feature?
ionela
Posts: 400
Joined: Mon Dec 05, 2011 6:08 pm

Re: Folding Elements

Post by ionela »

Hi,

We have our own implementation for the expand/collapse feature. There are four categories of components that match this expand/collapse pattern:
  • nested topics

    Code: Select all

        
    <div class="topic task nested1" id="prunning">
    <h2 class="title topictitle2">Pruning</h2>

    <div class="body taskbody"> ... </div>
    </div>
  • sections that have a title

    Code: Select all

    
       <div class="section" id="iris__section_p3n_ln2_4y">
    <h2 class="title sectiontitle">Iris</h2>
    <p class="p">....</p>
    </div>
  • tables that have a title (see the example above).
  • index terms groups

    Code: Select all

    
    <li class="wh_term_group">
    <span class="wh_first_letter">T</span>

    <ul>
    <li class="wh_term"><span>tasks</span></li>
    </ul>
    </li>
The other elements that do not match any of the patterns above cannot be folded.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
Post Reply