[pmwiki-users] More than one Category Group
Patrick R. Michaud
pmichaud at pobox.com
Fri Feb 24 12:09:13 CST 2006
On Fri, Feb 24, 2006 at 10:14:10AM -0700, Bellave Jayaram wrote:
> Now, my question is if it would be possible to create another Category
> Group called Films where there would be pages like Films.DirectedBy (which
> would contain a category Films.StevenSpielberg, Films.PeterJackson etc.)
> and Films.OscarWinning (which would contain Film.LordOfTheRings,
> Film.SavingPrivateRyan etc.).
>
> In other words, can tags in different namespaces be accommodated in
> Pmwiki? If so, how?
There's really nothing very special about the Category group
itself, other than that we've created a [[!...]] markup that makes it
easy to create category links.
Any PmWiki page can serve as a "category". For example, you
could create Films.StevenSpielberg and Films.PeterJackson, and
on each of those pages create a link to Films.DirectedBy, as in:
Categories: [[Films.DirectedBy]]
Then, on the Films.DirectedBy page (or anywhere else), you just do
(:pagelist link=Films.DirectedBy list=normal:)
and you'll get a list of all of the pages that are in the
Films.DirectedBy category (i.e., have a link to the Films.DirectedBy
page), which would include the Films.StevenSpielberg and
Films.PeterJackson pages.
Same steps apply for Films.OscarWinning -- just put links
to "Films.OscarWinning" in the relevant pages, and then use
pagelist to get a list of them.
> A follow up question to this would be, if we can have multiple Category
> Groups, would it be possible to confine search to a single Category Group?
Sure, in the same way that searches can be confined to any PmWiki
group.
(:pagelist group=Category:) search only the Category group
(:pagelist group=Films:) search only the Films group
(:pagelist link=Films.DirectedBy:) search only the pages in the
Films.DirectedBy category
The above also works with (:searchresults ...:) instead of (:pagelist ...:).
Or, if you're looking for a searchbox that limits searches to the group:
(:searchbox group=Category:) search pages only in Category
(:searchbox group=Films:) search only in Films
Pm
More information about the pmwiki-users
mailing list