Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

PagelistNotes

Summary: Notes on page lists
Version:
Prerequisites:
Status:
Maintainer:
Categories: Searching, PageList

See also:

Notes on page lists

predefined fmt paramenters:

Other custom formats can be defined in config.php or a cookbook script.

Custom formats added by cookbook scripts:

  • fmt=dictindex is added by Cookbook.DictIndex. It gives an pagelist broken into alphabetical sections.
  • fmt=forum is added by Cookbook.SimpleForum. It gives a 3-column table with page title, modified date and author.

Cookbook recipes can add more output formatting options via the $FPLFunctions array as a custom function. Several that are planned are also "fmt=category" to display pages in a form suitable for category listings, and "fmt=menu" to display the list as an expandable or dropdown menu.

link= parameter examples

(see also Backlinks, FastBacklinks?)

could there be a (:pagelist link=Groupname:), somehow?
  • To display a list of all pages that have a page link to Main* (link must explicitly reference Main; does not grab pages in Main that link to eachother without referencing the group):
(:pagelist link=Main*:)

Examples

Example 1: Display all pages of the current group, except this page, by time of modification, most recent first:

(:pagelist group={$Group} order=-time list=normal -{$FullName}:)

Example 2: Displays a list of all pages with links to Pm's profiles page (i.e., pages containing Pm. What's more, the pages are listed in reverse order by modification time (most recently changed pages first):

(:pagelist link=Profiles.Pm order=-time fmt=simple:)
Note that the link= and order= options are "expensive" in that they require a fair amount of page scanning in order to obtain their results. On the other hand, link= and order= are less expensive than doing full text searches, and in future versions of PmWiki they may end up being optimized even further.

Comments/Questions

A through AZ B through BZ C through CZ titles listing

I will have a large wiki with lots of play titles. I would like to be able to have separate pagelists containing section A titles, section B titles, section C titles, etc. instead of one large alphabetical listing of titles. Is this possible with pagelist? PL 20060218

You can use wildcards for this:
      !!!A section: 
      (:pagelist group=Plays list=normal name=A* :)
      !!!B section:
      (:pagelist group=Plays list=normal name=B* :)
      !!!C section:
      (:pagelist group=Plays list=normal name=C* :)
      etc.
      !!!X Y Z section
      (:pagelist group=Plays list=normal name=X*,Y*,Z* :) 

~HansB

Searching for page names only (not content)

In a large wiki, pages are often named systematically, so I sometimes need to get a list of pages with specific name parts (the Linux ls *name* thing). I couldn't find a way to configure it (list=xxx allows so but only for predefined patterns), so I added the following code to pagelist.php (beta36) near line 111 next to the 'group' option:

  if ($opt['named']) array_unshift($pats,"/({$opt['named']})/i");

Then with

  (:pagelist named=ReleaseNotes list=normal:)

I get (very quick) a list of all pages containing "ReleaseNotes" in their name. Wouldn't that be worth adding to the mainline code? tpahl


Listing all groups except one

(:pagelist group= -PmWiki:) will list from all groups execpt PmWiki. See Directives#pagelist?

Question

(:pagelist group=Recipes list=normal apple pie:) lists all pages with apple AND pie in them, how do I get a list of all pages with apple OR pie?

Answer

I would suggest use two pagelist directives:
(:pagelist group=Recipes list=normal apple :)
(:pagelist group=Recipes list=normal pie:)
DirkBlaas
This unfortunately list all pages that have both apple and pie on them twice.

(:pagelist group=Recipes list=normal -apple -pie:) lists all pages without apple OR pie, how do I get a list of all pages without apple AND pie in them?


How to exclude more than one group

This is possible from pmwiki 2.1.beta21 onwards using this syntax:

   (:pagelist group=-xxx,-yyy,-zzz :)

(HansB gave me this hint - Thanks!) Note : attention as mentioned in others pages the separator is NOT the comma but the space between two groups name

Does this apply to the name parameter too, eg

 (:pagelist group=TrampingReports order=-name list=normal name=-2005*,-HomePage,-Template:)

See Also

Contributors

  • Radu
  • joachim Durchholz
  • HansB

What about a way to list the "spaced" versions of the titles?

  (:pagelist group=Main.* fmt=titlespaced :)

-Jonathan Cross (jcross--gmail)

This can easily be done with pagelisttemplates. Just us {=$Titlespaced} inside your titlespaced format. See PagelistTemplateSamples. Martin Fick October 15, 2006, at 12:38 PM
Edit - History - Print - Recent Changes - Search
Page last modified on February 10, 2010, at 01:31 PM