DITA: Add an expanding side pane (Sidr)
For a demo of this functionality, see the Sidr pane demo here.
Although there are a variety of jQuery sidebar plugins, the Sidr works pretty well. It allows you to easily call different menus, and arrange the panel to appear on the left or right. The original purpose of Sidr was to act as a menu for mobile devices that don't have much screen real estate, but it works well in other situations too.
The particular scenario where I think this functionality is critical is with code samples. With code samples, you're limited to about 2 lines of comments per 5-10 lines of code. But a lot of the stuff that's going on in code is really complicated and warrants more extensive elaboration. This is where the side panel comes in really handy. You can elaborate as much as you want in the expanding side panels.
Integrating this plugin permanently alters the OxygenXML webhelp (though not visible, just in the scripts that are loaded and source code IDs) so make a backup of your files before committing changes. Also, the method described below is just one way of integrating the plugin, not the only way.
Integrate Sidr into OxygenXML
To integrate the Sidr plugin into OxygenXML:
Allow IDs to pass through
id="sidepanel_1"
won't
appear in DITA's webhelp output (they're stripped out entirely). We need to hack
Oxygen's webhelp files to allow these tags to pass through.
Add functions to trigger Sidr
Add content in your topic
Transcluding content from another page
About Tom Johnson
I'm an API technical writer based in the Seattle area. On this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, AI, information architecture, content strategy, writing processes, plain language, tech comm careers, and more. Check out my API documentation course if you're looking for more info about documenting APIs. Or see my posts on AI and AI course section for more on the latest in AI and tech comm.
If you're a technical writer and want to keep on top of the latest trends in the tech comm, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.