MozillaZine

Talk:Rules/Templates

From MozillaZine Knowledge Base

Contents

Asqueella's Proposal

(Summarized by Mozcerize)

We shall be moving to the use of categories, and it would be really nice if a "This article applies to..." message was generated from categories data. This can be done using templates with parameters. 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}}.

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 parameter 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

added "up to" and "org" templates asqueella 01:44, 27 Mar 2005 (PST)

Concerns

I thought about using templates a bit more; looks like {{applies to|app1|app2|category}} type of templates force us to have similar categorization for different application. Is that OK? (Makes sense to me - if an article applies to two apps and belongs to a category, then that category should make sense for both apps). --asqueella

I agree; this isn't really a problem. In fact, I think it is a bonus, as it will enforce consistency. --Mozcerize 02:01, 6 Mar 2005 (PST)

List of useful templates for "content organizers"

I'm making a list of templates which will be useful for those involved in reorganizing the KB through the use of categories.

Useful templates listed on | Special pages - All pages - Templates are:

  • org — usage: {{org}}
  • stub — usage: {{stub}}
  • up to — usage: {{up to|catName}} e.g. {{up to|Profiles}}
  • wrongtitle — usage: {{wrongtitle|title=Good Page Name}}
  • cleanup — usage: {{cleanup}}
  • merge — usage: {{merge}} [[Better Article]]
  • mergefrom — usage: {{mergefrom}} [[Bad Article]]
  • noquestions — usage: {{noquestions}}

Other templates not currently listed on that page (and perhaps not yet implemented are:

  • appliesto — usage: {{appliesto|AppName|CatNameMinusAppNameSuffix}} e.g. {{appliesto|Firefox|Issues}}
  • appliesto2 — usage: {{appliesto2|AppName1|AppName2|CatNameMinusAppNameSuffix}} e.g. {{appliesto2|Firefox|Thunderbird|Issues}}

Asqueella, if these last two are not yet implemented, would you mind doing so? Thanks!

Done. See Search Bar and Using keyword searches for examples. --asqueella 14:53, 18 September 2005 (PDT)
Great! --Mozcerize

Note that we should decide on a format for template names, particularly as regards whether or not they should contain spaces and use camelCase. Personally, I prefer no spaces and lowercase, as it's easier to type ;-)

--Mozcerize 08:55, 18 September 2005 (PDT)

I went ahead and added these to the article, more or less as is, just to make it easier for people to know what templates are actually being used. --wintogreen 18:44, 6 November 2005 (PST)

Great! --Mozcerize 00:19, 7 November 2005 (PST)

Pretty table

I've basically copied over the prettytable template from Wikipedia word for word except for toning down the gray background color a little. Just mentioning it here in case there's an issue with it. --hao2lian

New template for articles to be updated

I was thinking that since the 1.5 releases are not far off, it might be nice to have a template something like this to slap onto articles that need to be updated. (This is based on the cleanup template.) It would also include [[Category:Articles to update|{{PAGENAME}}]] at the end.

The wording isn't exactly elegant, but I figure it would be simpler to have a shared template than separate ones for Firefox and Thunderbird. Maybe someone else can do better with the wording. Anyway, the basic idea is to flag the page for kb users (in case they're perplexed about "wrong" info in articles) and for kb editors (so we can more easily keep track of these articles). What do you think? --wintogreen 03:16, 31 October 2005 (PST)

I like this idea, and the wording seems ok to me. Let's call this template {{update}} --Mozcerize 10:15, 31 October 2005 (PST)
Thanks. I went ahead and created it, along with "Articles to update" category, which has an upto to the Org category. Please fix or tweak where necessary. --wintogreen 22:05, 31 October 2005 (PST)

Delete this article

This article doesn't seem to be of much use - there are no rules defined for templates that aren't defined elsewhere. Templates are listed here, and we can put the usage of each template on its talk page.--Np 20:22, 8 September 2006 (UTC)