[pmwiki-users] Multiple CategoryGroups: 404 header

Patrick R. Michaud pmichaud at pobox.com
Tue Sep 26 11:25:10 CDT 2006


On Tue, Sep 26, 2006 at 09:08:25AM +0200, Petko Yotov wrote:
> Hello, Patcrick and all,
> 
> I would like to have five or six Category groups (Tags, ProjectCategory, 
> ContactCategory...) but unless for the original "Category.*" I always recieve 
> a "404 Not found" header and a default text.

This may be fixed when we implement virtual pages or some sort
of "auto-create page" function (see my notes on "Plans for 2.2.0").

However, in the meantime you can get PmWiki to not return 404
result codes for pages in those groups.  The easiest way may
be to create a per-group configuration file for each group
that contains:

    <?php  if (!defined('PmWiki')) exit();
      $DefaultPageTextFmt = '';
      $PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';

> I tried to copy and adapt the code from stdmarkup.php to config.php:
> 
>  $pagename = ResolvePageName($pagename);
>  ## [[?Tag]]

FWIW, using separate punctuation characters for each extra
category *could* lead to some problems down the road, especially
since some of them (such as '?') already have another meaning in
certain contexts.

In reality, there's not much special about the [[!Category]] markup;
one can create categories in other groups just by using the
groupname:

    [[Category/XYZ]]
    [[Tags/XYZ]]
    [[ProjectCategory/XYZ]]
    ...etc...

Pm




More information about the pmwiki-users mailing list