====== PageList Plugin ====== ---- plugin ---- description: Lists pages in a nice looking table or unordered list author : Dokufreaks (previous authors: Matthias Schulte, Michael Hamann, Esther Brunner, Gina Häußge, Michael Klier) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2023-08-27 compatible : Rincewind, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum depends : conflicts : similar : tags : formatting, list, tables, page downloadurl: https://github.com/dokufreaks/plugin-pagelist/archive/master.zip sourcerepo : https://github.com/dokufreaks/plugin-pagelist bugtracker : https://github.com/dokufreaks/plugin-pagelist/issues donationurl: ---- > **Update note**: In August 2023 the css styling is changed a bit. The specific styles for each cell are replaced by more general styles. Also all styles, except ''simplelist'', got an additional class ''plgn__pglist'' to target better this plugin with your own styling. ===== Description ===== The Pagelist Plugin takes a list of wiki pages and provides a nicely formatted table with information about them. The plug-in has a number of flags that can be used to control the information and format of the page list. The user can provide a list of specific page references as can some popular helper plugins such the [[Blog]], [[Discussion]], [[Editor]], [[Tag]], [[Task]] and [[Dir]] plugins. ===== Syntax ===== Just wrap a regular unordered list of internal links with the ''%%%%'' tag. You may provide specific internal page references or have plug-ins supply them as in the example below: * [[..:blog:|Blog Plugin]] * [[..:discussion:|Discussion Plugin]] * [[..:editor:|Editor Plugin]] * [[..:tag:|Tag Plugin]] * [[..:wrap|Wrap Plugin|This is shown in the description cell]] ^ [flags] | flags can be used to alter the appearance of the pagelist, [[#flags]] | optional | ==== Flags ==== ^ Default flag |^ Alternative flag |^ Setting in\\ [[plugin:config|Config Manager]] ^ ^ ''default'' | table with horizontal lines ^ ''table'', ''list'' or ''simplelist'' | standard DokuWiki table or list style | ''style'' | ^ ''noheader'' | hide the heading row of the pagelist table ^ ''header'' | show the header | ''showheader'' | ^ ''firsthl'' | show the first headline ^ ''nofirsthl'' | show the page name | ''showfirsthl'' | ^ ''date'' | show the creation or last modification date ^ ''nodate'' | hide the date | ''showdate'' | ^ ''user'' | show creator or contributors ^ ''nouser'' | hide the user | ''showuser'' | ^ ''nodesc'' | hide the description ^ ''desc'' | show the description (from metadata) | ''showdesc'' | ^ ''nodiff'' | no displaying of differences column ^ ''showdiff'' | displays the differences column with the diff icon linking to the corresponding diff page for each row | ''showdiff'' | ^ ''nosummary'' | no summary of last edit ^ ''summary'' | show summary of the last page edit | no setting | ^ ''nocomments'' | hide the number of comments ^ ''comments'' | show the number of comments (if [[discussion|Discussion Plugin]] is installed) | ''showcomments'' | ^ ''notags'' | hide the tags ^ ''tags'' | show the tags (if [[tag|Tag Plugin]] is installed) | ''showtags'' | ^ ''noimage'' | show image of the page ^ ''image'' | needs [[pageimage|Pageimage Plugin]] installed. Can either be defined on page or image with same name as page will be used | ''showimage'' | ^ ''nosort'' | no sortation of pages ^ ''rsort/sort'' | sorts the pages (reverse) alphabetically by pagename | ''rsort/sort'' | ^ | if only ''sort'' is set it will sorts by ''id'' ^ ''sortby='' | sort by the requested property. Info should be provided with ''addPage()'' or some info can be retrieved form metadata. | ''sortby'' | ^ ''limit=0'' | list all given entries ^ ''limit='' | Limits the number of entries to . 0 = list all given items. | no setting | The ''sortby='' flag uses the info directly from the data supplied (e.g. if used in another plugin), or tries to compile or retrieve it from metadata. It sorts default by ''id''. Next to the column names as used internally in the provided data, you can use ''pagename'' for using only the pagename part of the ''id'' thus ignoring the namespace part, or ''ns'' for sorting pages before equal named namespaces. ''title'' uses the first headline of a page. Other property names are: ''date'', ''user'', ''desc'', ''summary'', and if the respectively plugin is available: ''comments'', ''linkbacks'', ''tags'' and ''image''. If called in other plugins these can eventually add their own columns as well. ==== Example ==== //an unordered list of pages to display// In the example above, pagelist will display information about the provided pages in a table with a header line and a comments column (if the [[plugin:discussion|Discussion Plugin]] is installed). The user (or a plugin) must supply the specific pages to display in the list. ===== 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 [[plugin:blog]] plugin. ^ ''style'' | List style (default, table, table/list, simplelist) | ^ ''showheader'' | Show table header | ^ ''showfirsthl''| Show the first headline instead of the page name | ^ ''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) | ^ ''showdiff'' | Displays a differences column with the diff icon linking to the corresponding diff page for each row | ^ ''showcomments'' | Shows/hides comments of a page (requires the [[plugin:discussion]] plugin) | ^ ''showlinkbacks'' | Shows/hides linkbacks of a page (requires the [[plugin:linkback]] plugin) | ^ ''showtags'' | Shows/hides tags of a page (requires the [[plugin:tag]] plugin) | ^ ''showimage'' | Shows/hides the image column (requires the [[pageimage|Pageimage Plugin]]) | ^ ''sort'' | Sorts the pages alphabetically by pagename | ^ ''sortby'' | Sort the page by the given property, e.g. ''id'', ''pagename'', ''ns'', ''title'', ''date'', ''desc'', ''user'' etc or columns from plugins | ===== Helper Plugin ===== You can easily use the functionality of the Pagelist Plugin in your own plugins. Here is a basic code snippet: $pages = [ ['id' => 'wiki:dokuwiki'], ['id' => 'wiki:syntax'], ]; $pagelist = $this->loadHelper('pagelist'); if (!$pagelist) return false; // failed to load plugin $pagelist->startList(); foreach ($pages as $page){ $pagelist->addPage($page); } $renderer->doc .= $pagelist->finishList(); Since release ''2017-08-24'' the function ''startList()'' has got an optional parameter to specify a CSS class for adding it to the class of the table element: $pagelist->startList('myclass'); For more details, see [[plugin:pagelist:development|How to use Pagelist in your plugin]]. ===== Bugs / Feature Requests ===== Please report bugs or feature requests at the [[https://github.com/dokufreaks/plugin-pagelist/issues|Bug tracker]]. ===== Changes ===== {{rss>https://github.com/dokufreaks/plugin-pagelist/commits/master.atom date author}} ===== Localization ===== Submit translation via the translation tool: https://translate.dokuwiki.org/plugin/pagelist