[pmwiki-users] Generate a list of categories, when some category pages don't exist
Patrick R. Michaud
pmichaud at pobox.com
Tue Mar 20 08:32:02 CDT 2007
On Tue, Mar 20, 2007 at 09:13:17AM -0400, the Other michael wrote:
> On 3/19/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Mon, Mar 19, 2007 at 10:39:22PM -0400, the Other michael wrote:
> >> But if the pagelist (referencing the cat-tagged pages) is included in
> >> the header or footer, that would mean we've got an auto-created empty
> >> page.
> >
> >I don't quite understand this last comment.
>
> If I'm understanding AutoCreate, it automatically creates (ahem) a
> page when first referenced -- but it doesn't fill it with anything.
It only creates pages that match the pattern given by the key, thus
$AutoCreate['/^Category\./'] = array('ctime' => $Now);
only creates pages in the Category group.
> If the only content given to the bulk of category pages is created by
> the group footer (a pagelist directive listing references, one of the
> suggestions on http://www.pmwiki.org/wiki/PmWiki/Categories
>
> Then AutoCreate will be creating an empty page.
Yes. However, it doesn't have to create an empty page --
the administrator can set:
$AutoCreate['/^Category\./'] =
array('ctime' => $Now,
'text' => "Automatically created by AutoCreate\n");
and the page won't be empty.
Or, perhaps even better, one can set $AutoCreate to be:
$AutoCreate['/^Category\./'] =
array('ctime' => $Now,
'text' => '(:pagelist link=Category.{$Name} list=normal:)');
Now each new category page is automatically created with the
pagelist command needed to display the pages in the category,
and it's no longer necessary to put the (:pagelist:) command
into Category.GroupFooter.
> But
> 1) if pages are auto-created when a tag is clicked, what happens when
> the category tag is changed or removed? Although this tag has ceased
> to exist/be used (is there a difference?), it will still appear on a
> pagelist of group Category pages.
Yes, that's correct. Having a wiki does require some maintenance.
However, eventually we'll have an solid "find orphans" capability
working again, and the unreferenced Category pages would show up
as orphans.
> 2) general itchiness at empty pages serving as placeholders just for a
> listing of categories. It seems like WikiBloat.
Well, the pages don't have to be empty. :-) And we will eventually
have a way of finding all of the categories without actually having
to create pages for them.
> I guess that's why people can turn things on and off.
Absolutely. :-)
Pm
More information about the pmwiki-users
mailing list