Last modified: 2005-10-12 09:38:21 UTC
The definitions of templates are often on a page for maintenance reasons. Sometimes they are also defined within templates. Both are in special pages (eg Template: or Wikipedia:) It would be great if it were possible of either not to display these at all or to have a switch in the definition of the category to switch these off.
See example at http://en.wikipedia.org/wiki/Category:Candidates_for_speedy_deletion , which includes unwanted category items like "Template:Delete" and "Wikipedia:Template messages/All"
(In reply to comment #0) > The definitions of templates are often on a page for maintenance reasons. > Sometimes they are also defined within templates. Both are in special pages (eg > Template: or Wikipedia:) It would be great if it were possible of either not to > display these at all or to have a switch in the definition of the category to > switch these off. http://nl.wiktionary.org/wiki/Categorie:Woorden_in_het_Hongaars is a page with words in Hungarian. Hungarian is one of the 200+ languages that have words on the nl:wiktionary. The category is added from within the template that attributes a word to a language. These templates are all on a special page http://nl.wiktionary.org/wiki/WikiWoordenboek:Lijst_van_messages which should NOT be on this list. So I appreciate your point but it is not good for this application of templates. What I want is NOT a blanket change but the possibility to turn it off by way of a switch or something.
Probably it is enough to prune out pages not in the main namespace before displaying the list of pages in a category description page. Selectively switching on or off the display requires support for more syntax as well as complicates the process of deciding whether or not to display the link to a page and this decision needs to be taken for each page in the category. Unless there are pressing reasons for doing the latter, we should probably follow the [[KISS principle]].
An alternative proposed in bug 450 is to group the pages by their namespace.
It is correct and proper for pages marked as belonging in a category to be displayed in that category; this will not be changed. If you want some way to include category tags in templates without categorizing the template, please file an enhancement bug to that effect.
OK, changed the summary to match that. Opening a new bug would mean the previous comments might go unnoticed by those tracking the new bug. Note that some of the existing comments point towards such a syntax to selectively turn off categorization.
*** Bug 835 has been marked as a duplicate of this bug. ***
I've tried to word the summary a bit better - for one thing because it seemed too close to describing the existing [[:category:foo]] syntax, rather than what's actually being requested. I think I favour bug 450 as a better way of making this unnecessary in most curcumstances, mainly because I'm not quite sure how this would work in practice. I think there are two situations which have to be considered here: 1) Templates that automatically categorise articles that include them, but which shouldn't be categorised themselves. (e.g. [[Template:Delete]] should not show up as a member of [[Category:Cadidates for speedy deletion]], but pages including it should) 2) Pages that demonstrate the use of templates should be able to do so without becoming categorised (e.g. [[Wikipedia:List of templates]] or whatever it's called should not be included in hundreds of categories, even though it uses templates that have categorisation as an effect) I'm not quite sure exactly how you'd specify a syntax for (1), since it would be (AFAIK) the only feature where the content behaved differently on its own from when included. Basically, the syntax would need to say <if transcluded>[[Category:foo]]</if>. Which is getting into the realms of bug 364, almost. But implementing namespace seperation, per bug 450, would mean that this would only be a problem in the obscure case that you wanted to create [[Category:Templates using some particular template]] (and really really minded that [[Template:some particular template]] wasn't included...) Situation (2) would be marginally easier, and could take a number of forms (some of these are based on suggestions in bug 835): * "__NOCAT__" stops the page being included in *any* categories. Simple, but not very flexible. * "{{nocat:delete}}" includes [[Template:Delete]] without processing any category tags. Probably a good middle ground - perhaps the [[Category:...]] tags could just be scrubbed from the template before it was included? * "<nocat>" and "</nocat>" delimit a section of an article in which category tags are not parsed (e.g. "[[Template:Delete]] looks like <nocat>{{delete}}</nocat>"). Allows you to do it round the edge of a whole block for example/list pages; but probably adds more complexity than utility.
Clarification of the distinction between bug 706 and bug 835: (The new syntax proposed below is just an example and might be ugly. I don't intend to propose that we use this syntax.) bug 706: 1) [[azbycxdw]] has the normal syntax: {{delete}}. 2) [[Template:Delete]] has some new syntax like: [[Category:Candidates for speedy deletion|Template:Delete|no_cat]] In this case [[[Category:Candidates for speedy deletion]] lists [[Template:Delete]] but not [[azbycxdw]]. bug 835: 1) [[dime]] has the normal syntax: [[Category:Currency]] 2) [[dime/bus stop]] has some new syntax like: {{:dime|no_cat}} In this case [[Category:Currency]] lists [[dime]] but not [[dime/bus stop]]. bug 450 offers a (good|bad) solution for bug 706, but not for bug 835 (since both pages are in the article namespace). BTW in bug 706 comment 8, case 1 is what is being discussed at bug 706 and case 2 is what is being discussed at bug 835, but for the fact that case 2 of bug 706 comment 8 seems to deal only with transclusion of a page in Template: namespace but bug 835 attempts to deal with the transcluded page being in any namespace.
Of course I meant: bug 706: 1) [[azbycxdw]] has the normal syntax: {{delete}}. 2) [[Template:Delete]] has some new syntax like: [[Category:Candidates for speedy deletion|Template:Delete|no_cat]] In this case [[[Category:Candidates for speedy deletion]] LISTS [[azbycxdw]] but DOES NOT LIST [[Template:Delete]]. Sorry for any confusion.
Of the proposed solutions I liked these: 1) The syntax {{delete|nocat}}. Ie, being able to use "|nocat" when using any template. Seems to fit all purposes. 2) If for some reason 1) doesn't work, <cat> and </cat> tags would work well too.
(In reply to comment #11) > Of the proposed solutions I liked these: > > 1) > The syntax {{delete|nocat}}. Ie, being able to use "|nocat" when using any > template. Seems to fit all purposes. > > 2) > If for some reason 1) doesn't work, <cat> and </cat> tags would work > well too. Thue, the issue you are talking about is being tracked in bug 835. This bug is for some syntax *IN* the template so that the template *DOES NOT* get categorized but other pages transcluding the template *DO* get categorized. What the solutions you mention solve is bug 835, which asks for some syntax *WHILE TRANSCLUDING* a template so that the template *DOES* get categorized but the page transcluding the template *DOES NOT* get categorized.
Probably some processing is required when the template contents are "folded in" before the real parser sees the entire text. How about inserting "special" delimiters for start & end of template text while "folding in" and letting the parser handle these regions specially later on? e.g. "foo {{templ}} bar" is currently replaced by "foo contents of Template:templ bar". Instead replace it with "foo {{contents of Template:templ}} bar". When the parser sees the "{{" (unless it is within <nowiki>) it'd know it is processing code from within a template (Apart from this, it ignores the "{{"). It remembers it is within the template until it reaches the *MATCHING* "}}". If [[Template:templ]] uses [[Category:categ|nocat]], the parser sees "foo {{contents of Template:templ that includes [[Category:categ|nocat]] as well as other things}} bar". After the "{{", category tags with |nocat]] are not ignored until the *MATCHING* "}}". On the other hand, if [[Category:categ|nocat]] is found ouside of any {{...}} regions, then the category is ignored, so [[Template:templ]] wouldn't be categorized.
I think we're all rather lost in the confusion between this and bug 835. They're similar in some ways, but very different in others, so lets not try to apply the same solutions in both places. I've tried to simplify the summary: [old:] "category syntax such that the page the syntax is in ISN'T categorized but other pages transcluding it ARE" [new:] "syntax such that a (template) page can be un-categorized, but still categorise pages transcluding it" Please don't be confused if I refer to "templates"; I mean "anything that's being transcluded" NOT "anything in the Template: namespace". For this bug, we just need a way of saying "if this page is being viewed normally, don't process categories" - or, for finer control, "... don't process _this_ category / _these_ categories". This requires a piece of syntax with the following properties: A) makes clear to the user what it does (this is actually taxing me at the moment) - basically, a more elegant way of saying "<if transcluded>[[Category:Foo]]</if>"; or, for the whole page "__NO_CATEGORIES_UNLESS_TRANSCLUDED__" B) when saving (or viewing) the page (*on its own*) causes the parser to ignore (probably, remove without processing) the associated category tag(s) C) when transcluding the page, has no effect - e.g. the magic syntax itself is removed before the text is merged into that of the page actually being saved/viewed The similarity to bug 835 is mainly the need for a function that strips out the Category tags in [a particular part of] the source text (property 'B') For all that, I still haven't thought of a (very likely) situation where sorting categories by namespace (bug 450) wouldn't provide an entirely usable workaround without having to invent such a piece of syntax - except for using a template to add templates to a category, which is surely rare enough that people could just live with the "extra" template always being listed. [e.g. using {{delete this template}} to create a [[Category:Templates that need deleting]] would always leave you with [[Template:Delete this template]] appearing amongst the category's list of "pages in the Template: namespace"]
I agree with Rowan. I think bug 450 would solve the problems this bug is trying to address on the user end. However, I believe it's still necessary to address bug 835, which presents some of the same technical problems as this bug.
*** Bug 1985 has been marked as a duplicate of this bug. ***
Tim Starling has apparently coded a feature which fits this bug - an "<includeonly>" tag. See http://mail.wikipedia.org/pipermail/wikitech-l/2005-August/031123.html
compare with bug 835: syntax to transclude a page without the containing page inheriting categories, interlanguage links
Resolving this as FIXED.