Sidebar
From MegaZine3
![]() |
|
|---|---|
| Name | Sidebar |
| Files |
sidebar.swf |
This plugin adds a panel to the GUI which contains context sensitive content. This means it is possible to define different content for this panel based on the current page of the book. Until the sidebar has been opened or closed by the user manually, it will be in "automatic mode". In this mode, it will automatically open upon content changes, and closed again after a customizable amount of time.
Contents |
[edit] Settings
sidebardelay
- Type: Integer
- Default:
1000
The delay to wait in automatic mode after a content change before opening the bar.
sidebarslideduration
- Type: Number
- Default:
0.125
How fast to slide open / close the side bar. This is the time in seconds it takes to complete the animation.
sidebarclosedelay
- Type: Integer
- Default:
10000
The time in milliseconds the side bar is open in automatic mode, before it closes again. Note that this delay gets reset whenever the content of the side bar changes.
[edit] Tags
This plugin uses an extra child node of the book node to define the contents of the sidebar.
The main node name is sidebar. This node can contain any number of child nodes named sidebarcontent, which must have an attribute named startpage. This is the page number starting at which the content defined in the sidebarcontent node gets displayed. The actual content must be defined in the form of ASUL definitions.
[edit] Example
<book plugins="sidebar" sidebardelay="5000"> <sidebar> <sidebarcontent startpage="0"> <box width="200" height="400" background="image(data/default.jpg)"/> </sidebarcontent> <sidebarcontent startpage="2"> <box width="300" height="400" background="image(data/chapter1.jpg)"/> </sidebarcontent> <sidebarcontent startpage="10"> <box width="200" height="300" background="image(data/chapter2.jpg)"/> </sidebarcontent> <!-- and so on... --> </sidebar> <chapter> <!-- Actual book content --> </chapter> </book>
| MegaZine3 Plugin-related articles | |
|---|---|
| Plugins | Anchors · Background Sounds · Batchpages · Bookmarks · Console · ElementIDs · Gallery · Google Analytics · Help · JavaScript · Keyboard Navigation · Links · NavigationBar · Options · Overlays · Password · PDFLinks · Print · PrintPDF · SWFAddress· Search · Sidebar · Slideshow · Titles |
| Plugin Articles | Writing a plugin · Writing a plugin II · Plugin development |

