DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:acmenu

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:acmenu [2020-04-04 11:59] – new release torpedoplugin:acmenu [2024-02-09 23:25] (current) – [AcMenu Plugin] torpedo
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: An accordion menu for namespaces and relative pages. +description: An accordion menu for namespaces and relative pages 
-author     : Torpedo  +author     : Torpedo 
-email      : dcstoyanov@gmail.com +email      : dcstoyanov@gmail.com
 type       : syntax type       : syntax
-lastupdate : 2020-04-04 +lastupdate : 2023-11-22 
-compatible : 2017-02-19 "Frusterick Manners", 2018-04-22 "Greebo"+compatible : 2017-02-19 "Frusterick Manners", 2018-04-22 "Greebo", 2020-06-01 "Hogfather", 2022-07-31 "Igor", 2023-04-04 "Jack Jackrum", 2024-02-06 "Kaos"
 depends    :  depends    : 
 conflicts  conflicts 
Line 13: Line 13:
 tags       : menu, navigation tags       : menu, navigation
  
-downloadurl: https://bitbucket.org/tormec/acmenu/get/master.zip +downloadurl: https://github.com/tormec/AcMenu/archive/master.zip 
-bugtracker : https://bitbucket.org/tormec/acmenu/issues?status=new&status=open +bugtracker : https://github.com/tormec/AcMenu/issues 
-sourcerepo : https://bitbucket.org/tormec/acmenu/src+sourcerepo : https://github.com/tormec/AcMenu
 donationurl:  donationurl: 
  
 screenshot_img :  screenshot_img : 
 ---- ----
- 
  
  
 ===== Description ===== ===== Description =====
  
-AcMenu provides an accordion menu which lists the content of namespaces in a tree-like format. +AcMenu provides an accordion menu that lists the content of namespaces in a tree-like format. 
-The tree is built starting from the namespace where the AcMenu'syntax lives till the very end namespace.+ 
 +The namespace tree is built starting from the namespace where the plugin syntax is placed and going through all the sub-namespaces but those containing a sidebar page.
  
-This plugin respects the [[:ACL]] rules and, moreover, the [[config:sneaky_index]] and [[config:hidepages]] options that come with your DokuWiki configuration.+This plugin respects the [[:ACL]] rules besides the [[config:sneaky_index]] and [[config:hidepages]] options that come with your DokuWiki configuration.
  
  
Line 38: Line 38:
 ===== Syntax ===== ===== Syntax =====
  
-In the sidebar page, use the syntax:+In the [[config:sidebar|sidebar]] page, use the syntax:
 <code> <code>
 <acmenu> <acmenu>
Line 46: Line 46:
 ===== Examples ===== ===== Examples =====
  
-Just some screenshots to give you an overall idea of the final result.+Just some screenshots to give an overall idea of the final result.
  
-Suppose you want to create a sub-wiki in your main one, independent from it, as follows:+It is supposed the following wiki structure which has two separate sidebars:
 <code> <code>
 +--sidebar.txt +--sidebar.txt
Line 71: Line 71:
       +--service_b.txt       +--service_b.txt
 </code> </code>
-Than you can populate each ''sidebar.txt'' in the following manner:+where the two ''sidebar.txt'' have the syntax, respectively:
   * in '':sidebar.txt'' <code>   * in '':sidebar.txt'' <code>
 <acmenu> <acmenu>
Line 80: Line 80:
 </code> where the ''Go Back'' link is made according to the [[:namespaces|namespaces]] criterion. </code> where the ''Go Back'' link is made according to the [[:namespaces|namespaces]] criterion.
  
-When a visitor is in '':start.txt''the plugin shows the complete namespace tree collapsed except the namespace in which the ''sidebar.txt'', with AcMenu's syntax, is. Only if the visitor's browser has JavaScript disabled all namespaces will reveal their content so that it will be possible to continue the navigation.+When a visitor is in '':start.txt'' the plugin shows the complete namespace tree collapsed except the namespace containing the root sidebar.
  
-If the visitor decides to open the sub-wiki '':branch'', the AcMenu plugin shows only its sidebar.+If the visitor decides to open the sub-namespace '':branch'', the plugin shows only its sidebar.
  
-To deny the access to certain namespaces or pages you should set the appropriate rule in the [[:ACL]] management. In addition, it's possible to conceal those namespaces for which the visitor has no permission setting up the [[config:sneaky_index]] option in your Configuration Manager.+To deny access to certain namespaces or pagesthe appropriate rule in the [[:ACL]] management must be set. In addition, it's possible to conceal those namespaces for which the visitor has no read permission defining the [[config:sneaky_index]] option in your Configuration Manager.
  
-Furthermore it's possible to hide all ''sidebar.txt'' pages using the [[config:hidepages]] option in your Configuration Manager:+Furthermoreit's possible to hide the ''sidebar.txt'' and the ''start.txt'' pages((The explanation of the regular expression used in this example is the following: 
 +  - alternative matches must be separated by ''|'' 
 +  - to match a word at the end of a line the ''$'' symbol must be used 
 +  - to be sure that the word to match is preceded by '':'' or by any character ''.'' followed by '':'' use ''%%(?<= )%%'' 
 + 
 +With that syntax, the following pages will be hidden: 
 +  * '':sidebar'' 
 +  * '':namespace:sidebar'' 
 +  * '':namespace:start'' 
 +Whereas the following one will remain visible: 
 +  * '':start'' 
 + 
 +Even if the hidden pages are not listed among the search results, they will still be reachable by typing their exact path in the search bar (eg. ''sidebar'' or ''namespace:sidebar''). 
 +)) using the [[config:hidepages]] option in your Configuration Manager:
 <code> <code>
-(sidebar|other-pages)+(?<=:)sidebar$|(?<=.:)start$|other-matches
 </code> </code>
  
-The following image is the behaviour of the AcMenu plugin from the perspective of a user registered+The following image is the behavior of the AcMenu plugin in action
-{{ https://bitbucket.org/tormec/acmenu/downloads/acmenu.gif?nolink&recache }}+{{ https://raw.githubusercontent.com/tormec/AcMenu/master/images/acmenu.gif?nolink&recache }}
  
-Since this plugin uses cookies to remember the pages visited (they are automatically deleted as soon as the window browser is closed) if the visitor comes back to '':start.txt'' every namespaces untoggled will remain so.+Since this plugin uses cookies to remember the pages visited (they are automatically deleted as soon as the window browser is closed) if the visitor comes back to '':start.txt'' every namespace untoggled will remain so.
  
 The order in which the directory tree is presented is the following: The order in which the directory tree is presented is the following:
Line 104: Line 117:
  
  
-===== Configuration and Settings ===== 
  
  
 +===== Customization =====
  
-==== Hide namespaces and pages ==== 
  
-Firstset the appropriate permissions in your [[:ACL]] management. +If doesn't exist yetcreate a [[devel:css#user_styles|user-style]] CSS ''conf/userstyle.css'' and replace the plugin's CSS instructions as you please.
-Then, use the options: +
-  * [[config:sneaky_index]]: to hide namespaces. +
-  * [[config:hidepages]]: to hide pages;+
  
 +For instance, the list item markers can be changed with the following code:
 +<code css userstyle.css>
 +.acmenu ul.idx li.closed {
 +    list-style-image: url(../lib/images/plus.gif);
 +}
  
-===== Troubleshooting =====+.acmenu ul.idx li.open { 
 +    list-style-image: url(../lib/images/minus.gif); 
 +
 +</code>
  
-**Symptom:** AcMenu doesn't show/hide namespace'content.+It's also possible to change the DokuWiki'style only inside the plugin: 
 +<code css userstyle.css> 
 +.dokuwiki .acmenu .aside a:visited { 
 +background-color: none; 
 +}
  
-**Possible solution:** be sure that JavaScript is enabled in your browser, otherwise all namespaces remain open showing their content+.dokuwiki .acmenu span.curid a { 
-----+background-color: silver; 
 +color: black; 
 +
 +</code>
  
-**Symptom:** AcMenu doesn't keep untoggled any namepsace after have opened any link.+Use the Inspect Tool provided with your browser to test all the possible styles.
  
-**Possible solution:** be sure that cookies are enabled in your browser, otherwise AcMenu forgets the namespaces untoggled whenever a page is loaded. 
----- 
- 
- 
-===== Development ===== 
  
 +===== Troubleshooting =====
  
-==== Known Bugs and Issues ====+**Symptom:** AcMenu isn't keeping unfolded any previously opened namespace.
  
-Pleaseuse the relative bug tracker or write here and then I will move there.\\ --- [[dcstoyanov@gmail.com|Torpedo]] //2017-03-09 16:32//+**Possible solution:** be sure that JavaScript and cookies are enabled in your browserotherwise AcMenu forgets the previously namespaces untoggled whenever a page is loaded.
  
  
-> Looks like AcMenu does not handle international characters well. I get %-displays in the menu for headings containing 'åöäÅÖÄ'. 
-> //thoni56 2020-01-20// 
->> I've tested your example and it is displayed correctly. The very last release of AcMenu fixed an issue relative to non-ASCI filenames (which is just your case), so be sure to have upgraded the plugin. If the problem persists, let me know here [[https://bitbucket.org/tormec/acmenu/issues/27/diacritic-and-diaeresis-characters-are-not|Diacritic and Diaeresis Characters are not printed correctly]]. 
->> --- [[user>torpedo|Torpedo]] //2020-01-27 15:17// 
plugin/acmenu.1585994393.txt.gz · Last modified: 2020-04-04 11:59 by torpedo

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki