DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:alphaindex

Alphaindex Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Allows you to insert the alphabetical index of a namespace in a page

Last updated on
2016-02-02
Provides
Syntax
Repository
Source

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

Tagged with listing, menu, namespace, navigation

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

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.

:!: There is also a zip updated version with patches by community users.

Changelog

  • 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.

Discussion

plugin/alphaindex.txt · Last modified: 2020-02-29 18:28 by Aleksandr

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