DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:sectiontoggle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugin:sectiontoggle [2019-07-29 15:27]
turnermm [Examples/Usage]
plugin:sectiontoggle [2019-07-30 02:12] (current)
turnermm [Toggle Buttons]
Line 5: Line 5:
 author ​    : Myron Turner author ​    : Myron Turner
 email      : turnermm02@shaw.ca email      : turnermm02@shaw.ca
-type       : syntax+type       : ​action,syntax
 lastupdate : 2019-07-28 lastupdate : 2019-07-28
 compatible : 2012-10-13 "Adora Belle",​ 2013-05-10a "​Weatherwax",​ 2014-09-29b "​Hrun",​ Detritus, Eleonor Of Tsort, Frusterick Manners, Greebo compatible : 2012-10-13 "Adora Belle",​ 2013-05-10a "​Weatherwax",​ 2014-09-29b "​Hrun",​ Detritus, Eleonor Of Tsort, Frusterick Manners, Greebo
Line 23: Line 23:
 ===== Installation ===== ===== Installation =====
  
-:!: **Requirements:​** This plugin requires jQuery and was originally designed for use with the [[template:​dokuwiki|DokuWiki Template]]. In its current form, it should work with any template. 
  
 Search and install the plugin using the [[plugin:​extension|Extension Manager]]. Refer to [[:​Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:​extension|Extension Manager]]. Refer to [[:​Plugins]] on how to install plugins manually.
Line 31: Line 30:
  
 This plugin converts DokuWiki headers into toggles which open and close the sections immediately below them.  This plugin converts DokuWiki headers into toggles which open and close the sections immediately below them. 
 +==== To Configure or Not to Configure ====
  
-The plugin ​has undergone a number of revisions. In its current form, it will work out of the box with any template without any need for configuration. However, configuring the plugin as described in the section on [[#​configuring_for_mobile_devices|Configuring for Mobile Devices]] ​ __may__ be useful for efficiency.((The emphasis here is on may, i.e. possibly if you have large pages with many headers.)) ​ A group of the most suitable templates for phones come pre-configured in the file [[#​templatesinipreconfigured_templates|templates.ini]]. You can also configure using the [[#​configuration|Configuration Manager]].  ​+The plugin will work out of the box with any template without any need for configuration. However, configuring the plugin as described in the section on [[#​configuring_for_mobile_devices|Configuring for Mobile Devices]] ​ __may__ be useful for efficiency.((The emphasis here is on may, i.e. possibly if you have large pages with many headers.)) ​ A group of the most suitable templates for phones come pre-configured in the file [[#​templatesinipreconfigured_templates|templates.ini]]. You can also configure using the [[#​configuration|Configuration Manager]].  ​
  
 +==== To Toggle or Not to Toggle ====
 +=== Toggling ===
  
-When installed, the sections will initially be closed. Clicking on a header will open the section immediately below the header. Clicking on it again will close the section. Using the two buttons described [[#​syntax|below]],​ the user can open and close all the sections with a single click. ​ Headers without any text content below them will not be active and will not show the right arrow icon.  In addition, in the Configuration Manager, you can choose to prevent selected headers from being toggled, as in the sample page below. There the **End of Page Ø** header is an ''​h5''​ which is excluded, using the Configuration Manager, from being toggled.+When installed, the sections will initially be closed. Clicking on a header will open the section immediately below the header. Clicking on it again will close the section. Using the two buttons described [[#​syntax|below]],​ the user can open and close all the sections with a single click. 
 + 
 +=== Disabling Toggles === 
 + 
 +Headers without any text content below them will not be active and will not show the right arrow icon. They will simply be standard headers and not toggles. ​In addition, in the Configuration Manager, you can choose to prevent selected headers from being toggled, as in the sample page below. There the **End of Page Ø** header is an ''​h5''​ which is excluded, using the Configuration Manager, from being toggled.
  
 {{  https://​i.imgur.com/​7r3u9Kv.png ​ }} {{  https://​i.imgur.com/​7r3u9Kv.png ​ }}
Line 46: Line 52:
   ~~stoggle_buttons~~   ~~stoggle_buttons~~
  
-These buttons will be hidden if toggling is disabled, as described below under Configuration.+These buttons will be hidden if toggling is disabled ​using the ''​suspend''​ option, as described below under Configuration.
  
-==== Override ==== 
-This feature enables you to create a container ''​div''​ for the page, in which case it is not necessary to set the **name** option for identifying the div which holds the wiki content. However, you must set the **type** option either to ''​id''​ or to ''​class''​.  ​ 
-<​code>​ 
-~~stoggle_openDIV~~ 
-~~stoggle_closeDIV~~ 
-</​code>​ 
-You place the ''​openDIV''​ at the top of your wiki page and the ''​closeDIV''​ at the bottom. ​ This will create a div with a ''​section%%__%%toggle''​ id.  The entire wiki page will then be enclosed within this div. In all but the simplest of pages, these macros must be at the very top and the very bottom of your page. 
-  
  
 ===== Configuration ===== ===== Configuration =====
plugin/sectiontoggle.1564406838.txt.gz · Last modified: 2019-07-29 15:27 by turnermm