Page 1 of 1

Folding Elements

Posted: Wed Mar 28, 2018 12:23 pm
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?

Re: Folding Elements

Posted: Thu Mar 29, 2018 2:18 pm
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

Re: Folding Elements

Posted: Fri Mar 30, 2018 1:19 pm
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?

Re: Folding Elements

Posted: Fri Mar 30, 2018 4:12 pm
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