Template repository
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. A newer proposal in the same spirit can be found at the page Global templates. |
This is an idea for something that doesn't exist yet. If you want to help develop this idea, please edit this page.
Idea
[edit]To develop a set of "starter" or "default" templates (template templates, you might even say), that new wiki installations can copy and use.
Motivation
[edit]Pretty and clever templates are very difficult to write from scratch, and copying them from Wikimedia wikis is often very difficult because of extreme template nesting and hindered by licensing concerns. Good templates can enormously improve the look and navigability of a wiki.
Availability of public domain pedagogical templates will encourage wiki authors to build effective Open Educational Resources for a future wherein Open Distance Learning supported by OER would build the inclusive main stream education system all over the world.
Requirements
[edit]- Templates should be in the public domain.
Templates should be self contained, not calling other templates (or: maybe a maximum of one meta-template?).- Templates should have clearly defined dependencies, which can be pulled in along with them.
- Templates should have usage and modification instructions.
- Templates should not rely on ParserFunctions (or they should indicate if they do). *[most of the non–trivial, mediawiki.org/wikipedia templates, use much deeper nesting.]
- Templates should aim to be easy-to-read and understand, even without, usage instructions.
- We should also write some useful CSS that templates may use, and ship it with the templates; rather than, having manually coded CSS in each one. (bug 35704 may be of interest.)
- Images — use sparingly for easier re-use?
- Use public domain images, if necessary.
- Use PNG rather than SVG format for easier re-use (PNG uploads are configured by default, SVGs are not).
- Maybe offer multiple versions of templates(?) — One with SVG, one with PNG, and one with no image.
- Commons images(?) (Can you say instant commons)?
Guidelines for template writers
[edit]- Do not try to make the most extensible template ever. Do not keep everything, as variables for the User to provide (e.g. alignment of boxes); pick an alignment and hard-code it.
Distribution
[edit]Ways that people can get the templates:
- Possibly bundled — included by default(?)
- An extension(?)
- Special:Export This will always work, but it's not so much fun for a large number of pages and may require exporting meta-templates separately. Also, images still have to be manually copied, unless hosted in Wikicommons.
Needed templates
[edit]Corresponding Existing MW Templates
[edit]This page is outdated. |
This is a list of existing MW templates that would probably be included along with their required dependencies.
Type | Template | Description | Dependencies | Images |
---|---|---|---|---|
Mbox | ||||
{{ambox}} | Article message box. | |||
{{cmbox}} | Category message box. | |||
{{imbox}} | Image message box. | |||
{{ombox}} | Other pages message box. | |||
{{tmbox}} | Talk page message box. | |||
{{Mbox templates}} | ||||
{{asbox}} | Article stub box (Unused Template). | |||
{{dmbox}} | Disambiguation footer message box. |
| ||
{{fmbox}} | Footer & Header message box | |||
Wikipedia:Template:Navboxes | {{Navbox_suite}} | |||
{{Navbar}} | Adds navbar navigational functionality. | |||
{{Navbox_subgroup}} | Allows the creation of subgroups that can be assigned to a list item within {{Navbox}}. A subgroup may contain up to 20 list items. | |||
{{Navbox_with_collapsible_groups}} | Produces a navigation template that has groups of relevant articles on a certain topic. All groups are hidden by default. However, with a parameter call, an individual group can be shown that has the other articles in the same group. | |||
{{Navbox_with_columns}} | Presents its content in columns. | |||
Template:Documentation | {{Documentation }} | |||
Infobox | w:Template:Infobox |
Dependencies
[edit]There needs to a difference between whether the dependency is required for the template itself or rather the template documentation. If it is for the template documentation, is it necessary?
Template name | Description |
---|---|
Template:! | |
Template:Badge | |
Template:Border-radius | This template is a shortcut for producing rounded corners. It generates the CSS for various browsers. Supported browsers are the current versions of Opera, Firefox, Safari, Chrome and Internet Explorer 9. |
Template:Category handler | This is the {{Category handler }} meta-template.
It helps other templates to automate both categorization and category suppression. |
Template:Category handler/blacklist | |
Template:Category handler/numbered | |
Template:Clear | |
Template:High-risk | "This template is used on a very large number of pages." |
Template:If pagename | Helps other templates detect what page they are on. It uses pattern matching on the pagename. |
Template:Mbox templates | |
Template:Namespace detect | Helps other templates detect what type of page they are on. |
Template:Nowrap | |
Template:Shortcut | |
Template:Shortcut/layout | |
Template:Tl | Redirects to Template:Tlx |
Template:Tlx | This template creates example usage syntax for a template, and links the name to the template page. The "SISTER" parameter specifies an interwiki prefix to link to another wiki. |
Template:Yesno | Normalises an input to be a yes/no output. |
Template:File_other | |
Template:File_title | |
Template:TOC | |
Template:Template other | |
Template:Information |
- Warning
- One variable.
- Ambox
- AKA cleanup/article message box. Could be same as warning?
- No variables
- Tip
- One variable
- User welcome
- For user talk pages
- No variables (put names external to template)?
- Edit request
- For protected pages - put on talk page
- No variables - acts as a "tag" and people put their request below.
- Inline
- aka "citation needed"
- no variables.
- Licenses
- no variables.
- Ratings
- Like WikiProject talk page templates
- a small number of variables.
- Userboxes
- No variables.
- Pedagogical templates
- to develop Open Educational Resources (OERs)
- Documentation
- no variables; include { {SUBJECTPAGENAME} }/doc, and allow editing it
Template dependencies
[edit]These are templates and images that exist solely as variable dependencies for the above Templates. Without these, the above templates would not work.
Variables
[edit]TBD
Images
[edit]- http://commons.wikimedia.org/wiki/Category:Ambox
- http://commons.wikimedia.org/wiki/Category:Indication_icons
- http://commons.wikimedia.org/wiki/Category:I_icons
- http://commons.wikimedia.org/wiki/Category:Question_marks
- http://commons.wikimedia.org/wiki/Category:Help_icons
Done
[edit]In the "Done" section of Meta:Global template, appears some templates. You can help increasing the number of them.
See also
[edit]- MediaWiki Cooperation feature wishlist: Template Management
- Requests for comment/Global bits and pieces
- Another solution to this bug has been proposed at Meta:Community Wishlist Survey 2019/Miscellaneous/Shared Multilingual Templates and Modules available to all wikis, please support it.
- Global templates
External links
[edit]- Templates Wiki, a wiki collating wiki templates (for use on other Wikia wikis). Partially MediaWiki compatible.
- Miraheze Template Wiki, a non-WMF MW template repository.