Summary: Allow categorizing/tagging of pages with an easy interface.
Version: 2014-01-29
Prerequisites: PmWiki 2.2-beta series
Status: working
Maintainer: XES
License: GPL2
Users: +1 (View / Edit)
Categories: Blog
Discussion: TagPages-Talk

Questions answered by this recipe

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.


Simple opaque web form for adding categories to a page. Varying levels of security available, but use should be limited to privileged users only.


Download tagpages.phpΔ and place in pmwiki/cookbook/ folder of your website.

Add to config.php:


Optionally add before include line:

$XESTagAuth = 'read';

Default is that edit permission is required to add tags to a page. It's easier than editing the page and adding several [[!Category]] markups to each page. However, if you have read-protected pages you want authorized readers to tag, you may use this line to allow people with read permissions the ability to tag pages. Alternatively you may change it to 'admin' for admin-only tagging abilities, etc.

In-wiki usage example: add to Group/GroupFooter in wiki (change the "if auth" to match the privilege level so only people who can use the form will see it):

(:if auth edit:)(:input form action={*$PageUrl}:) (:input hidden action xestagpages:)
Tags:	(:input text "Tags" size="40":)	(:input submit value="Go":)
(:input end:) (:ifend:)
Optional: I've incorporated a Mediawiki-like div section at the bottom of the page showing the applicable tags. Add to your pub/css/local.css file (change as desired):
div.category { 
  border: 1px solid #666;
  padding: 0.5em;
  background-color:  #EEE;

Release Notes

No functional changes: added version number, tweaked instructions in script. This recipe has been working alone and with XESBlog since its creation on multiple websites for users with edit privileges.

Future possibilities:

  • captcha
  • form protections & parsing to allow use by non-privileged users
  • could have made category divider configurable, meant to before packing this up....

See Also




See discussion at TagPages-Talk

User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.