[pmwiki-users] Tagging like TiddlyWiki

Michael Fake michael.j.fake at googlemail.com
Sun Aug 16 08:01:33 CDT 2009


Thanks everyone. Working on some of the ideas thrown around in response to
this, I think I've finally got a solution I'm happy with:

- I tag pages using a link with an @ symbol, e,g [[@Dogs]]
- I've tweaked the MediaCategories recipe to pick up these links rather than
category links, and list them at the bottom of the page. As part of the
tweak I've got it calling a $TagGroup variable, rather than $CategoryGroup
variable, which in this case I've set to 'Main'.
- The [[@Dogs]] link therefore resolves to Main.Dogs
- On the Main.Dogs page I've got the following pagelist -
(:pagelist link={$Name} @{$Titlespaced} fmt=#titlesummary:)
 which lists all the pages that have a link to [[@Dogs]] or [[@dogs]], but
ignores pages that only have [[Dogs]]

So now on the Main.Dogs page I can list all those pages that I've tagged
with [[@Dogs]] (Main.Daschund, Main.Dalmatian, etc), without having to list
pages that only refer incidentally to Main.Dogs (such as Main.Cats). And
I've left categories untouched, so I can still use ordinary categories if I
want to.

I haven't tested beyond tagging a handful of pages, but so far I haven't
spotted any obvious holes.


2009/8/16 Peter Bowers <pbowers at pobox.com>

> 2009/8/14 Patrick R. Michaud <pmichaud at pobox.com>:
> ...
> > Use page text variables.  In the text:
> >
> >    (:tag: dogs:)
> >
> > In the pagelist command to find all of the pages tagged with "dogs":
> >
> >    (:pagelist $:tag=*dogs* :)
>
> Do note that PTVs are not part of the page index.  For performance
> reasons you might consider something like this:
>
> (:pagelist $:tag=*dogs* dogs:)
>
> so that the search term "dogs" can be used to optimize the search
> somewhat.  (Unless you're dealing with a pretty small site so the
> optimization isn't necessary.)
>
> -Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090816/c375b9c3/attachment.html 


More information about the pmwiki-users mailing list