DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:alphaindex

Plugin Alphaindex

Compatible with DokuWiki

No compatibility info given!

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

Last updated on
2008-10-28
Provides
Syntax
Repository
Source

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

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

Copy the Github link and paste it into the plugin_manager.

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?

Bugs / Feature Requests

Please report bugs or feature requests at the Github.com - Bug tracker.

Discussion

plugin/alphaindex.txt · Last modified: 2013/09/20 19:04 by Aleksandr