Table of Contents
Alphaindex Plugin
Compatible with DokuWiki
No compatibility info given!
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to indexmenu, indexmenu2, pagequery, tindexmenu
Description
This simple plugin allows you to insert an alphabetical index of a specified namespace in your pages. It should be useful in DokuWiki sites where pages are organized by namespaces.
It is fully inspired and based on the indexmenu plugin by Samuele Tognini samuele [at] samuele [dot] netsons [dot] org.
Notes
- Thanks to Samuele Tognini samuele [at] samuele [dot] netsons [dot] org, you can try the plugin here.
- Tested with 2006-03-09 DokuWiki version.
- ACL works, only authorized pages will be shown.
- useheading option works.
- Tested with some languages based on other characters than roman ones (Japanese, Chinese, Korean, Arabic, Russian, Thai).
- A big thanks to Samuele Tognini samuele [at] samuele [dot] netsons [dot] org for his plugin.
- Feel free to improve it.
- Feel free to correct my poor English
Syntax
{{alphaindex>[namespace][#n][|nons]}}
[namespace] | Namespace name from which the index starts. | optional with [n] or nons; “.” is the currIREent namespace; “..” or an empty value shows the top level namespace. |
---|---|---|
[n] | Number that specifies the max level of the tree index nodes. | optional; it can be used together with nons. |
nons | Exclude namespaces nodes from index. It shows only the pages | optional. |
Example that displays only pages inside wiki:plugins and lower namespaces (max two levels):
{{alphaindex>wiki:plugins#2|nons}}
example: {{alphaindex>.#2|nons}} shows all files with the depth of 2; the namespaces are not shown
CSS Style
All the data displayed by the alphaindex plugin are inside a div (called “alphaindex”).
You can customize each part of the generated code.
For example if you have defined the begin_letter_tpl as this :
==== {{letter}} ====
the plugin will generate the following HTML code :
<h3><a name="a" id="a">{{letter}}</a></h3>
and you can create the following CSS rule (for example) :
#alphaindex h3{ display: block; background-color: #dee7ec; padding: 2px 0 2px 10px; margin: 20px 0 5px 0; }
Configuration
The updated version in the how_to_install section is fully configurable with the config manager. |
numerical_index
Text display in block letter title for the page title beginning with a numerical value.
Optional
Default : '0-9'
Example : 'Numerical'
articles_deletion
List of article treated by the plugin. Each article is separated with a '|'.
Optional
Default : (empty)
Example : ^the +|^a +|^an + or ^le +|^la +|^les +|^l\' * (in french)
With the example above, the page 'The Rolling Stones' will be treated as 'Rolling Stones' instead of its real name.
articles_moving
Management of the articles when the article_deletion option is active.
Optional
Default : 1
Authorized values :
- 0 : No change
- 1 : The article is move to the end of the page name inside brackets
- 2 or more : The article is deleted
Example: with the pagename 'The Rolling Stones'
- 0 : 'The Rolling Stones'
- 1 : 'Rolling Stones (The)'
- 2 : 'Rolling Stones'
empty_msg
Message shown in your page when the index is empty.
Note : {{ns}} is an alias for the requested namespace.
Optional
Default : 'No index for <b>{{ns}}</b>'
title_tpl
Template (in DokuWiki syntax) for the index title.
Optional
Default : '===== Index ====='
begin_letter_tpl
Template (in DokuWiki syntax) at the beginning of each letter's block.
Note : the {{letter}} pattern is mandatory. It's an alias for the current letter.
Optional
Default : '==== {{letter}} ===='
entry_tpl
Template (in DokuWiki syntax) for each letter's entry.
Note : the {{link}} and {{name}} patterns are mandatory.They are aliases for the page link and the page name.
Optional
Default : ' * [[{{link}}|{{name}}]]'
end_letter_tpl
Template (in DokuWiki syntax) at the end of each letter's block.
Optional
Default : (empty)
hidepages
Name of pages not displayed in the index. Each page name is separated with a '|'.
Optional
Default : (empty)
Example : 'start|sidebar'
How to install
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Changelog
- Merge pull request #4 from splitbrain-forks/php7-signature (2016-03-05 12:26)
- Adjust method signatures to match parent (2016-02-02 12:57)
- added @NS@ placeholder to specify namespaces (2011-08-06 15:10)
- use getConf() to access configuration options / added en language files (2011-08-06 15:03)
- added option "metadata_title" to decide between heading/pagename for … (2011-08-06 14:42)
- fixed splitting the specified syntax ($match) into correct pieces (2011-08-06 14:36)
- W3C Validation / Revert to old str_replace instead of utf8_substr_rep… (2011-08-06 14:21)
- code formatting / removed getInfo() (2011-08-06 14:07)
- 2006-06-14 - version 1.2
- Fixed bug in namespaces display (lack of first letter for some namespaces).
- Use of utf8 functions instead of PHP ones
- 2006-05-22 - version 1.1
- Deletion of a dependence to indexmenu plugin
- 2006-05-19 - version 1.0
- First release
Todo
* To use the UTF8 functions instead of classic PHP ones for characters and strings management.
* What's about an update to do Configuration via the Admin-panel?
* And what's about a RegEx for hidepages
? Hem, RegEx is for experts and Dokuwikers are not experts!
Bugs / Feature Requests
Please report bugs or feature requests at the Github.com - Bug tracker.