[pmwiki-users] A Couple of Category Questions
Hans
design5 at softflow.co.uk
Fri Dec 8 08:43:52 CST 2006
Thursday, December 7, 2006, 10:20:19 AM, Ian wrote:
> Question 2:
> What would be a good method of restricting authors to only use a
> particular set of defined categories e.g. an edit form with a
> pre-defined list of categories.
I thought a bit more about this and came up with this scheme:
redefine the category markup like this:
Markup('[[!','links','/\\[\\[!(.*?)\\]\\]/e',
"Keep(MakeLink(\$pagename,PSS('$CategoryGroup/$1'),NULL,'',''),'L')");
This is the same as PmWiki's except it does not use $LinkCategoryFmt,
which means that a new category link will have the dotted underline
and appended question mark of a normal wiki link to a non-existant
page.
then set up all the categories you use as pages in the Category
group, and create a list of all these with pagelist, which you could
put anywhere (SideBar, RightBar etc.):
(:pagelist group=Category list=normal fmt=title:)
and set up your Category.GroupFooter by adding it:
(:pagelist link=Category.{$Name} list=normal:)
Now users creating new categories will see the questionmark beside
the link, which may remind them that this category(-page) does not
exist. You could further restrict creation of category pages by
setting a special edit password for admin on the whole group Category.
Category.GroupAttributes?action=attr
And DO NOT use
$AutoCreate['/^Category\\./'] = array('ctime' => $Now);
because you want to create all your categories yourself, by hand so to
speak.
Hans
More information about the pmwiki-users
mailing list