Description
In order to use [[FullSearch(CategoryTemplate)]] to insert a list of all template pages, templates need to be assigned CategoryTemplate.
Unfortunately, when subsequently creating a new page from a template, the CategoryTemplate has to be deleted manually or else the new page too is matched by [[FullSearch(CategoryTemplate)]].
Steps to reproduce
- create a new page
select a template that is in CategoryTemplate from the list
forget to manually delete the CategoryTemplate from the new page
- save changes
do a text search for CategoryTemplate
notice that the new page is listed as being in CategoryTemplate
Details
This wiki.
Workaround
Manually edit away the CategoryTemplate text (and possibly the trailing '----\n')
Discussion
I have attached a patch against 1.3.4 that deletes \bCategory.*Template\b from the template as it is copied into the raw_text for the new page.
- Hmm, this sounds dirty. Is it really the way to go?
The patch merely automates something that you otherwise have to do manually if CategoryTemplate is to be useful. DeleteTemplateCategories.patch is careful to only edit the last '\n----\n' delimited chunk of a page. Regardless, I agree with NirSoffer (see FeatureRequests/AddCategorySearchTerm): a better way of attaching metadata to pages would make categories work more transparently overall. However, it is still important that new pages created from templates do not inherit the CategoryTemplate metadata, no matter how metadata is implemented!
-- GaryVaughan 2005-07-25 11:08:23
Plan
- Priority:
- Assigned to:
Status: don't think this is a bug because the template should be preserved, also it is not necessary to have the template include CategoryTemplate because it needs to match the Template RE anyway. -- JohannesBerg