plugin:sectiontoggle
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:sectiontoggle [2020-02-05 05:57] – Version upped Aleksandr | plugin:sectiontoggle [2023-12-31 18:13] (current) – [sectiontoggle Plugin] 24.78.8.122 | ||
---|---|---|---|
Line 3: | Line 3: | ||
---- plugin ---- | ---- plugin ---- | ||
description: | description: | ||
- | author | + | author |
- | email : turnermm02@shaw.ca | + | email : emoonga1993@gmail.com |
type : action, | type : action, | ||
- | lastupdate : 2019-12-25 | + | lastupdate : 2023-12-27 |
- | compatible : 2012-10-13 "Adora Belle", | + | compatible : 2012-10-13 "Adora Belle", |
depends | depends | ||
conflicts | conflicts | ||
Line 13: | Line 13: | ||
tags : mobile, tablet, phone, collapsible, | tags : mobile, tablet, phone, collapsible, | ||
- | downloadurl: | + | downloadurl: |
bugtracker : https:// | bugtracker : https:// | ||
sourcerepo : https:// | sourcerepo : https:// | ||
Line 37: | Line 37: | ||
=== Toggling === | === 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 [[# | + | When installed, the sections will initially be closed, except as described below under # |
+ | === Auto Toggling === | ||
+ | There are two situations where a toggled section will remain open __when a page loads__. This enables you to link to a section of a page and that section will be open when the page loads. | ||
+ | - When the url accessing the page contains a hash element referencing a page section. | ||
+ | - When the '' | ||
+ | |||
+ | The Dokuwiki table of contents also benefits from auto toggling. | ||
=== Disabling Toggles === | === Disabling Toggles === | ||
Line 45: | Line 51: | ||
{{ https:// | {{ https:// | ||
- | ===== Syntax ===== | + | |
+ | ===== Using the Action Menu Button ===== | ||
+ | |||
+ | As an alternative to the traditional sidebar syntax for open and close buttons, this plugin now offers a more convenient option. Users can opt to use a toggle button located directly in the action menu of the page. | ||
+ | |||
+ | This feature enhances user experience by providing a streamlined and accessible way to control section visibility without the need for additional syntax. | ||
+ | |||
+ | To enable the action menu button: | ||
+ | |||
+ | - Navigate to the plugin configuration settings. | ||
+ | - Locate the option labeled **" | ||
+ | - Enable this option to display the toggle button in the action menu. | ||
+ | |||
+ | Note: Enabling this feature will replace the need for sidebar syntax for opening and closing sections. Users can still use the traditional method if preferred. | ||
+ | |||
+ | ===== Using Syntax ===== | ||
==== Toggle Buttons ==== | ==== Toggle Buttons ==== | ||
Line 54: | Line 75: | ||
These buttons will be hidden if toggling is disabled using the '' | These buttons will be hidden if toggling is disabled using the '' | ||
+ | ==== Limiting toggles to a section of the page ==== | ||
+ | The following two macros will mark the start and end of an enclosing '' | ||
+ | ~~stoggle_openDIV~~ | ||
+ | ~~stoggle_closeDIV~~ | ||
+ | These should not cross '' | ||
+ | DIV 1 | ||
+ | DIV section__toggle | ||
+ | Div 1 closed | ||
+ | DIV section__toggle closed. | ||
===== Configuration ===== | ===== Configuration ===== | ||
- | ^ option | + | ^ option |
- | | platform | + | | platform |
- | | type | + | | type |
- | | name | + | | name |
- | | headers | + | | headers |
- | | suspend | + | | suspend |
- | | xcl_headers | + | | xcl_headers |
- | | mobile_alt | + | | mobile_alt |
- | | tablet_alt | + | | tablet_alt |
- | |tablet_toggle| 1,0 |0 |Use toggles on tablets as well as phones| | + | | tablet_toggle |
- | |xcl_ns| | |Comma separated list of namespaces to be excluded from toggles, without initial or final colons (i.e. name:space , not : | + | | xcl_ns |
- | |xcl_pg| | |Comma separated list of page ids to be excluded from toggles (without initial colons, i.e page:id, not :page:id )| | + | | xcl_pg |
- | |incl_ns| | | Comma separated list of namespace ids where toggles should appear (without initial colons). Takes precedence over '' | + | | incl_ns |
- | |incl_pg| | | Comma separated list of page ids where toggles should appear (without initial colons). Takes precedence over '' | + | | incl_pg |
+ | | h_ini_open | ||
+ | | toc_toggle | ||
+ | | start_open | ||
==== Notes on the Options ==== | ==== Notes on the Options ==== | ||
Line 79: | Line 112: | ||
* '' | * '' | ||
* **Name and Type** | * **Name and Type** | ||
- | * The '' | + | * The '' |
* **Headers and xcl_headers** | * **Headers and xcl_headers** | ||
- | * The headers option selects the smallest header to be converted to a toggle. If you choose h6, all headers between h1 and h6 will be converted to toggles. You can, however, use the xcl_headers setting to omit selected headers from being converted to toggles. | + | * The headers option selects the smallest header to be converted to a toggle. If you choose h6, all headers between h1 and h6 will be converted to toggles. You can, however, use the '' |
* **mobile_alt** | * **mobile_alt** | ||
* When '' | * When '' | ||
* **tablet_alt** | * **tablet_alt** | ||
* If set to true the '' | * If set to true the '' | ||
+ | * **start_open** | ||
+ | * This option will not apply to mobile devices or to logged in users without edit permission. | ||
- | |||
- | |||
When the toggle buttons are included on a page, they will not display if the platform is excluded from section toggling. So, if you want toggling only on mobile devices, you can still include these buttons on your page but they will not display on standard desktop systems. | When the toggle buttons are included on a page, they will not display if the platform is excluded from section toggling. So, if you want toggling only on mobile devices, you can still include these buttons on your page but they will not display on standard desktop systems. | ||
Line 122: | Line 155: | ||
=== Preconfigured Templates === | === Preconfigured Templates === | ||
- | - 20cones | + | - [[template:20cones]] |
- | - adoradark | + | - [[template:adoradark]] |
- | - arctictut | + | - [[template:arctictut]] |
- | - bootstrap3 | + | - [[template:bootstrap3]] |
- | - dokucms | + | - [[template:dokucms]] |
- | - flat | + | - [[template:flat]] |
- | - greensteel | + | - [[template:greensteel]] |
- | - kajukkk | + | - [[template:kajukkk]] |
- | - minima | + | - [[template:minima]] |
- | - monochrome | + | - [[template:monochrome]] |
- | - prsnl10 | + | - [[template:prsnl10]] |
- | - sprintdoc | + | - [[template:sprintdoc]] |
- | - twentyfifteen | + | - [[template:twentyfifteen]] |
- | - wallpaper | + | - [[template:wallpaper]] |
- | - white | + | - [[template:white]] |
- | - writr | + | - [[template:writr]] |
plugin/sectiontoggle.1580878628.txt.gz · Last modified: 2020-02-05 05:57 by Aleksandr