|
PmWiki /
Categories-TalkThis is a talk page for improving Categories. For "Catergories Just Don't Work"!If you are driving yourself crazy trying to introduce Categories on an existing site, try deleting wiki.d/.pageindex . This wiil do no harm; the index will be regenerated. This also may help other apparently inexplicable failures. .pageindex can get out of sync from a variety of situations from klutzy admin to filesystem disaster. Using the Auto Created PagesIf you enable the auto creation of the category pages you can use them to display links to pages which belong to that category. Add these two lines to your local config.php. $page = ReadPage('Category.GroupTemplate', READPAGE_CURRENT);
$AutoCreate['/^Category\\./'] = array('ctime' => $Now, 'text' => $page['text']);
Then navigate to the Category.GroupTemplate page (which will create a new page) and edit that page to include: (:pagelist link=Category.{*$Name} list=normal:)
Every time a category page is autocreated it will have the content you placed in the GroupTemplate. Each category page will display a linked list of pages in that category. This places the list in the body of the page rather than in the footer. This should not be required, if one creates the Category.GroupFooter, as explained in the page. --Petko February 14, 2009, at 08:11 AM
Q: Is there any way to take tag name to AutoCreate's 'text' field so in the end I can have page Category.AlternativeWorld with title "Alternative world" (as it's written in the tag, second word's first letter is small as opposed to $Titlespaced) for example? Distinguishing between defining and referencing a categoryUnfortunately PmWiki cannot distinguish between defining a category (or tagging a page)[1] [2], normally done like this [[!TalkPage]]
and referring to a category, via [[Category/TalkPage]]
Invisible category links
How to list categories used on any given page
and then used in the pagelist name= parameter.
There is a mailing list thread where this matter is - Is it possible, somehow, to merge two (or more) categories, after they have been created? This is a talk page for improving PmWiki.Categories. |