Pagelist Plugin

pagelist plugin by Gina Häußge, Michael Klier
Lists pages in a nice looking table or unordered list. (previous authors: Esther Brunner)

Last updated on 2008-04-12. Provides Syntax, Helper.
Compatible with DokuWiki 2006-11-06, rc2008-03-31.

Tagged with list, pages, tables.

Download plugin-pagelist.tgz (up to Dokuwiki 2007-06-26b)
plugin-pagelist.tgz (Dokuwiki rc2008-03-31 and above)

Description

The Pagelist Plugin does – as its name says – list wiki pages in a nice way. Besides its function as a stand-alone syntax plugin, it serves as helper plugin for the Blog, Discussion, Editor, Tag, Task and Dir plugins.

Syntax

Just wrap a regular unordered list of internal links with the <pagelist> tag:

<pagelist&[flags]>
  * [[..:blog:|Blog Plugin]]
  * [[..:discussion:|Discussion Plugin]]
  * [[..:editor:|Editor Plugin]]
  * [[..:tag:|Tag Plugin]]
</pagelist>
[flags] flags can be used to alter the appearance of the pagelist, see flags optional

Flags

Setting Default Alternative
style default table with horizontal lines table or list standard DokuWiki table or list style
showheader noheader hide the heading row of the pagelist table header show the header
showdate date show the creation or last modification date nodate hide the date
showuser user show creator or contributors nouser hide the user
showdesc nodesc hide the description desc show the description (from metadata)
showcomments nocomments hide the number of comments comments show the number of comments (if Discussion Plugin is installed)
showtags notags hide the tags tags show the tags (if Tag Plugin is installed)

Example

<pagelist&header&comments>
...
</pagelist>

This will show a list of pages with a header line and a comments column (if the Discussion Plugin is installed).

Configuration

The plugin can be configured using the DokuWiki configuration manager available in the admin menu. The settings also apply to plugins which use the helper component of the pagelist plugin, like for example the archive component of the blog plugin.

style List style (default, list, table)
showheader Show headline of listed pages
showdate Shows/hides the date column (hide, creation date, modification date)
showuser Shows/hides the user column (hide, creator, contributors)
showdesc Shows/hides a short description taken from the first paragraph of a page (hide, max. 160 characters, max. 500 characters)
showcomments Shows/hides comments of a page (requires the discussion plugin)
showlinkbacks Shows/hides linkbacks of a page (requires the linkback plugin)
showtags Shows/hides tags of a page (requires the tag plugin)

Helper Plugin

You can easily use the functionality of the Pagelist Plugin in your own plugins. Here is a basic code snipplet:

  $pages = array(
    array('id' => 'wiki:dokuwiki'),
    array('id' => 'wiki:syntax'),
  );
  $pagelist =& plugin_load('helper', 'pagelist');
  if (!$pagelist) return false; // failed to load plugin
  $pagelist->startList();
  foreach ($pages as $page){
    $pagelist->addPage($page);
  }
  $renderer->doc .= $pagelist->finishList();

Demo

You can try this plugin here.

Bugs

Please report bugs at the Bug tracker.

Further Resources

Discussion

stlye.css enhancements

Here are some minor css enhancements (use fullwidth and avoid justification of pagenames like “Minutes 2008-05-05”). I'm too lazy to submit a bugreport.

--- style.css	2008-04-12 20:36:37.000000000 +0200
+++ style.css.neu	2008-05-21 20:03:49.000000000 +0200
@@ -5,6 +5,8 @@
   border-spacing: 0;
   margin-bottom: 1em;
   border-collapse: collapse;
+  text-align: left;
+  width: 100%;
 }
 
 div.dokuwiki table.pagelist tr {
@@ -14,7 +16,7 @@
 
 div.dokuwiki table.pagelist th,
 div.dokuwiki table.pagelist td {
-  padding: 1px 1em 1px 0;
+  padding: 1px 1em 1px 10px;
 }
 
 div.dokuwiki table.ul th,
@@ -50,4 +52,4 @@
 
 div.dokuwiki td.date {
   text-align: right;
-}
\ Kein Zeilenumbruch am Dateiende.
+}
Do'h, what if I am to lazy to add this patch, huh? — Michael Klier 2008/05/24 18:03
 
plugin/pagelist.txt · Last modified: 2008/06/11 22:22 by chi
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate