Talk:Rules/Templates: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
 
Line 1: Line 1:
==Proposal==
==Proposal==
'''Problem:''' I would like to use mediawiki [http://meta.wikimedia.org/wiki/Meta:Categories categories] more. They can even replace such pages as [[Firefox]], [[Firefox : Issues]] etc. It would be really nice if a "This article applies to..." message was generated from categories data.
'''Problem:''' I would like to use mediawiki [http://meta.wikimedia.org/wiki/Meta:Categories categories] more. They can even replace such pages as [[Firefox]], [[Firefox : Issues]] etc. '''It would be really nice if a "This article applies to..." message was generated from categories data.'''


'''The solution''' is to use [http://meta.wikimedia.org/wiki/Help:Template templates] with params. Without [http://meta.wikimedia.org/wiki/Extended_template_syntax more powerful templates] it won't be very clean, but it's still pretty cool.
'''The solution''' is to use [http://meta.wikimedia.org/wiki/Help:Template templates] with params. Without [http://meta.wikimedia.org/wiki/Extended_template_syntax more powerful templates] it won't be very clean, but it's still pretty cool.
Line 29: Line 29:


::::OK, let's use a separate paragraph for additional text then --[[User:Asqueella|asqueella]]
::::OK, let's use a separate paragraph for additional text then --[[User:Asqueella|asqueella]]
===Started adding content to the article itself===
I started adding content to the article, feel free to correct me or add information.
--[[User:Asqueella|asqueella]]

Revision as of 23:14, 5 March 2005

Proposal

Problem: I would like to use mediawiki categories more. They can even replace such pages as Firefox, Firefox : Issues etc. It would be really nice if a "This article applies to..." message was generated from categories data.

The solution is to use templates with params. Without more powerful templates it won't be very clean, but it's still pretty cool.

The basic idea is to create an "Applies to" template with parameters that has both the "This article applies to..." message and the [[Category:...]] links that put the article in appropriate category/categories.

Since mediawiki's template support is very limited at this moment, we'll have to create a few different templates, each with different number of params, ie: {{appliesto1|Firefox}} and {{appliesto2|Firefox|Mozilla Suite}}.

As I said, I would also like to add categories like Category:Firefox issues that will eventually replace pages like Firefox : Issues. We can create a template like (please suggest a name for it, remember it should be easy to type) {{appliesto2 subsection|Firefox|Thunderbird|Issues}} that becomes

: ''This article applies to [[Firefox]] and [[Thunderbird]]
[[Category:Firefox]] [[Category:Thunderbird]]
[[Category:Firefox issues]] [[Category:Thunderbird issues]]

Additional text (mentioned by wintogreen) may be provided through an additional param or put in a separate paragraph, right after the template call.

I have set up an example here: Browser will not start up using Template:test. The article is not perfect, but it requires the most complex template to be used.

What do you think?

--asqueella

Excellent! I hope this will be implemented. I'm not in favor of getting rid of the Issues/FAQs/Tips pages, though, because they allow the article links to be organized and reorganized at will, in just a few minutes. Guanxi did an excellent job dividing up the Thunderbird : FAQs Mail section into subsections, for instance. (The subsections are arranged in a logical order, and as much as possble the items within those subsections are in a logical order, too.) It would be a shame to lose this if it can't be reproduced easily with Categories. But anyway, yeah! I hope the templates idea will fly! --wintogreen
wintogreen, what do you think about customizable text in the blurb (you seem to be worried about it)? Should all templates have a (unfortunately required) param for that or can we just put the additional info outside the template?
--asqueella
Seems like it would be too much trouble to include it in the template, because of the unpredictable variety of customized blurbs that would be needed. It would be silly to have to keep revising the template every time some new customized text is needed. --wintogreen
OK, let's use a separate paragraph for additional text then --asqueella

Started adding content to the article itself

I started adding content to the article, feel free to correct me or add information. --asqueella