[pmwiki-users] Tagger

Kathryn Andersen kat_lists at katspace.homelinux.org
Tue Jan 27 18:32:34 CST 2009

On Wed, Jan 28, 2009 at 12:49:13AM +0100, kirpi at kirpi.it wrote:
> I am failing to understand how the Tagger[1] recipe is to be used.
> So, I enabled it with
>        $TaggerGroups['Tags'] = 'Tags';
>        include_once("$FarmD/cookbook/tagger.php");
> Now, somebody visits a A page and adds
>       Tags: dog, cat, mouse
> Somebody else visits another page and adds
>       Tags: mouse, rabbitt, lion

The idea of Tagger is an extension of the idea of Categories[2], so 
one needs to understand how Categories work before one can understand
how Tagger works.  Categories gives one special markup which creates a
link to the given page in the Category group, which itself needs to be
set up to display the pages that link to it.

What Tagger gives one is *multiple* category groups, each one of which
needs to be set up like one would set up a standard PmWiki Category

I use this extensively in my wiki, for example with my pages on books.
For example take the page about a book I read recently, "An Assembly
Such as This"[3].

I have tagger groups for Author, Genre, Series and Status.
$TaggerGroups['Author'] = 'Reviews-Book-Author';
$TaggerGroups['Genre'] = 'Reviews-Genre';
$TaggerGroups['Series'] = 'Reviews-Series';
$TaggerGroups['Status'] = 'Reviews-Book-Status';

Author: Pamela Aidan
Genre: Historical, Romance
Series: Fitzwilliam Darcy, Gentleman
Status: Owned

This gives me different "category groups" for different kinds of
information, so that I can look at the books by author, by genre, by
series, and by status (whether I own the book or whether I am just
reading it).

For example, the "Author: Pamela Aidan" will give me a link to
[[Reviews-Book-Author/PamelaAidan]] without me having to type
in the link code.  This also has the advantage that I can use the
"Author: Pamela Aidan" as a page-text-variable in pagelists or display

>  - Now, how can I have a list of those pages which bear the 'dog' tag?
By looking at the Tags/Dog page, if the Tags group has been set up
correctly as a "category" group.

>  - How can I have a list of all the tags used, site-wide?
By setting up the Tags group to (a) auto-create pages and (b) setting up
the Tags/Tags page to list all pages in the Tags group.

>  - What are those Tags/Dog, Tags/Cat pages supposed to be used for?
For listing all pages that link to them.

>  - What are those Page Variables listed in the recipe for?
The PageVariables listed in the recipe are used in two ways:
a) in pagelists
b) in display templates

[1] http://www.pmwiki.org/wiki/Cookbook/Tagger
[2] http://www.pmwiki.org/wiki/PmWiki/Categories
[3] http://www.katspace.org/Reviews/Book/Volume/AssemblySuchAsThis

Kathryn Andersen
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe

More information about the pmwiki-users mailing list