Last modified: 2011-11-29 23:42:16 UTC
We already have the list of templates used on a revision of a page, showed on the edit box. I would like to have variable/magic word {{TEMPLATEUSED}} that list all the template used in the article. This help template interacting with each other, change their behaviour with the presence of the other template. For example, template 1 = "French", template 2 = "Noun". When '''only''' "french" is used, the page is categorized in category "French", when '''only''' "Noun" is used, the page is categorized in category "Noun", and when both are used, the page is in "French noun". The behaviour is defined in side the template, so if the definition does not mention other templates, like "Blah", then the existence of "Blah" inside the page does not affect the behaviour of "French" or "Noun". This feature is useful not only for Wiktionary, but also for many other automatic categorizing templates on Wikipedia.
This is extremely unclear and likely to be very, very, very, very fragile to the point of never working correctly. Closing as INVALID given that there's no clear description of what output would look like.
It looks like what you're asking for is *intersecting* templates. But in the case that you've brought up, it might just be easier to create a parameter in the "-noun-" template that takes in a language code and assigns the entry to the appropriate category (either using #language: or any of the {{xx}} templates that many of the Wiktionaries already have). For any more advanced uses of intersecting categories, you might want to talk to the people behind WiktionaryZ; they might have some ideas on how to implement this more effectively.
Sorry for not indicating explicitly the output. {{TEMPLATESONTHISPAGE|French}} gives 1 if [[Template:French]] is on a revision of the article, and 0 otherwise. So here is the complete code for [[Template:French]]: <code> ==French== <includeonly> {{#ifexpr: {{TEMPLATESONTHISPAGE|Noun}} | [[Category:French nouns]] | [[Category:Frenchs]] }} </includeonly> </code> So here is the complete code for [[Template:Noun]]: <code> ==French== <includeonly> {{#ifexpr: {{TEMPLATESONTHISPAGE|French}} | [[Category:French nouns]] | [[Category:Nouns]] }} </includeonly> </code> Is this more clear, so that this bug is less "INVALID"? Or is this still 4-very "fragile to the point of never working correctly"?
"is on a revision of the article" -> "is on the currrent revision of the article". Sorry for my English.
Oh and: ...for [[Template:Noun]]: <code> ==French== should be: ...for [[Template:Noun]]: <code> ==Noun== (this is just presentation on the page)
Since no one answered, I change the status back to Reopen, so that someone could at least explain why this suggestion is INVALID.
Now that the output is being specified, I would like to chime in and ask why this is being wontfixed. If it's too much of a database load or something in the current setup, that means it won't be used on Wikimedia, but it can still be added to the software if someone feels like writing it. (I would note that status-warring with the Chief Technical Officer of the Wikimedia Foundation over the status of a bug would probably be a Very Bad Idea, however.)
(In reply to comment #7) > (I would note that status-warring with the Chief Technical Officer of the > Wikimedia Foundation over the status of a bug would probably be a Very Bad Idea, > however.) I was reading the bug activity wrong, my bad. No status-warring involved, so ignore that bit.
(In reply to comment #8) > (In reply to comment #7) > > (I would note that status-warring with the Chief Technical Officer of the > > Wikimedia Foundation over the status of a bug would probably be a Very Bad Idea, > > however.) > > I was reading the bug activity wrong, my bad. No status-warring involved, so > ignore that bit. Actually, and yes I know triple-posting is obnoxious but sorry, ignore the entire #7. It's irrelevant in light of what actually happened (I thought brion re-wontfixed it and Trần Thế Trung re-reopened it, becoming confused by unrelated actions due to the nonspecificity of the IRC-channel wikibugs bot).
The request cannot be implemented reliably with the present system (or possibly at all).
The basic problem I think is that you won't know what templates are in use until you've expanded all the templates -- at which point it's too late to expand {{TEMPLATESONTHISPAGE}} or {{#hastemplate:noun}} or such. Would have similar problems with something like {{#incategory:noun}}.