Pagelist Plugin

Compatible with DokuWiki

  • 2012-01-25 "Angua" unknown
  • 2011-05-25 "Rincewind" yes
  • 2010-11-07 "Anteater" yes

plugin Lists pages in a nice looking table or unordered list. (previous authors: Esther Brunner)

Last updated on
2011-05-10
Provides
Syntax, Helper
Repository
Source

Tagged with formatting, list, pages, tables

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]]
  * [[..:wrap|Wrap Plugin|This is shown in the description cell]]
</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)
showfirsthl firsthl show the first headline nofirsthl show the page name
rsort/sort nosort no sortation of pages rsort/sort sorts the pages (reverse) alphabetically by pagename

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 table header
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)
sort Sorts the pages alphabetically by pagename

Helper Plugin

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

  $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. FIXME (link broken)

Bugs / Feature Requests

Please report bugs or feature requests at the Bug tracker.

Further Resources

Changes

Localization

Discussion

This is a place for general plugin discussion. Please submit bugs and feature requests to bug tracker linked on this page.

Suppressing the new thread

Is it correct that I need to comment out the renderer if I want to prevent a “create this page” under the commentlist? 1)

            // show form to start a new discussion thread?
            if ($perm_create && ($this->getConf('threads_formposition') == 'bottom'))
//                $renderer->doc .= $this->_newThreadForm($ns);
            return true;

You should set the configuration option threads_formposition to off instead. — Phil 2010/01/29 16:05

How to add two columns?

I want to add two columns for a plugin. But the function addColumn only support one column for one plugin. How can I do this?


need the same, very important!! — alfiox 2010-12-22


Also need. If the “list” layout used html “list” syntax instead of being buried inside a table with invisible lines, I think it could interact with the wrap plugin to make columns. — Ashtagon 2011-07-28


That is quite complicated with the current layout of the plugin. The data storage isn't built to fetch multiple columns of another plugin. — M. S.M. S.
lupo49

DE / NRW / Sauerland
2011/07/29 20:32

If the pagelist plugin (or more important for my needs, teh tag plugin, which I think uses the same engine) had an option to return an actual list rather than a table that contains cells which are rendered to look like a list, the problem could then be solved by passing this plugin's output through the wrap plugin's <div col3>{{topic>your flags here}}</div> syntax. — AshtagonAshtagon

London, UK
2011/08/20 12:00
I went through the code. Inserting between 4 and 5 if statements that cause it to use an unordered list when $this→style == 'list' fixed it for me. I also had to ensure that it was only adding things when it should. But, overall, it wasn't that big of a deal. EDIT: I figured you guys would want to see it. Also, I am using the wrap plugin, so I edited helper.php to be compatible with that, it doesn't natively allow you to use multiple columns. http://pastebin.com/1HDytYdh WARNING: I only tested it using just the page name; I didn't use date or user or anything as I am using pagelist and tag to simulate the mediawiki category pages. YMMV and it might not work with other configs. Good luck! — serenewafflesserenewaffles

2012/01/07 22:18
I commented on the open bug on the tracker with explanation and pastebin — serenewafflesserenewaffles

2012/01/07 22:27
https://github.com/dokufreaks/plugin-pagelist/issues/15
Thanks for sharing your experiences. Could you please use the option “Minor Changes” when editing multiple times in a row, otherwise it generates a mail for every saving process. — M. S.M. S.
lupo49

DE / NRW / Sauerland
2012/01/07 22:58

Showing "Edit summary"

How to show the “edit summary” of the latest edit? — Flavius

pagelist: howto specify an additional argument for "date"-flag?

I would like to use pagelist together with “changes”-plugin to list those changes (within a namespace) that have been made on a specific date (e.g. 2011/01/13). How can i tell pagelist to do that? Thanks for help in advance! — Peter

1) /lib/plugins/discussion/syntax/threads.php
plugin/pagelist.txt · Last modified: 2012/01/17 00:53 by 24.18.132.182
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate