Aiuto:Howto categorie

Tratto da EduEDA
Jump to: navigation, search

Le Categorie forniscono indici automatici, utili per tabelle dei contenuti. Insieme ai links ed ai templates danno una struttura al progetto.

Per un elenco completo/alfabetico delle categorie, vedi Special:Categories.


Come aggiungere una categoria ed includere una pagina in una categoria

Crea un link nel namespace "Category"
esempio:

[[Categoria:Nome Categoria]]

ed e` fatta.

Collegare una categoria

Se vuoi collegare una categoria senza che l'articolo corrente venga aggiunto devi usare la seguente forma di link [[:Categoria:foobar]] (dove foobar e` il nome della categoria), nota gli extra : prima di Categoria.

Sottocategorie

Le Categorie stesse possono appartenere ad altre categorie. Quando visualizzi la pagina di una categoria alla quale appartengono altre categorie, viene generata automaticamente una separazione, viene prodotta una separazione e creata una lista di sottocategorie.

Per esempio puoi modificare [[Categoria:Soccer]] ed aggiungere un collegamento [[Categoria:Sports]]. La categoria Soccer sara` quindi una sottocategoria di della categoria Sports.

Categorie alle quali una pagina appartiene

Le pagine, categorie comprese, possono appartenere a piu` di una (altre) categoria. Le Categorie alle quali una pagina appartiene sono mostrate in un luogo fisso, in funzione del tema utilizzato (in basso per Monobook, in alto a destra per quello Standard), senza curarsi di dove viene specificato nel wikitext.

Configurazione chiavi veloci

Se vuoi che l'articolo, nella lista degli articoli della categoria, sia posizionato alfabeticamente da qualcosa che non sia il nome, devi usare la seguente forma di link: [[Categoria:foobar|sort key]] (dove foobar e` il nome della categoria e sort key e` il criterio con cui elencare).

Per esempio, per aggiungere una articolo chiamato Albert Einstein alla categoria "persone" ed avere l'articolo indicizzato per "Einstein, Albert" ("Einstein" come primo e "Albert" come secondo in elenco) devi scrivere "[[Categoria:Persone|Einstein, Albert]]".

Le chiavi veloci sono "case sensitive", nel senso che [[Categoria:The Foobar|Foobar]] e` elencato prima di [[Category:The Bar|bar]].

Un elemento categoria in un template; problemi di caching

Se un template contiene del codice che indica che e` in una categoria, questo non mette soltanto il template in una categoria, ma anche le pagine che includono il template. Ad esempio, this page includes Template:Hi and as a result is in Category:English documentation.

The page that contains the template correctly lists the categories to which it belongs. However, adding or deleting a category tag in the template does not add or delete the listings on the category page of pages that use the template, until some edit is made in the page that uses the template.

In other words:

  • lists of categories a page is in, are up-to-date
  • lists of pages in a category are based on the situation just after the last edit of the pages

Since adding or removing a category or template tag is obviously an edit there is only a complication when a page is indirectly added to or deleted from a category, through a change in a template the page uses.

A category name depending on a template or parameter

An attempt to specify a category name depending on a template or parameter does not work and gives odd results, see Template:Cat and Template talk:Cat.


Relation with "What links here"

A category is somewhat like a "What links here" page with regard to the special category links.

However, "What links here" tends to be a by-product of links that are useful anyway (although links may be put with this use in mind), while category links are put specially to produce a category page.

Linking from a test page, user page, etc. to a category is considered to pollute the category, while regular links from such pages showing up in "what links here" is considered harmless.

Category listings are alphabetical, for "What links here" this typically applies for the first part only, for the pages already linking to the given page at the time of the last rebuilding of the link tables in the database.

Applying "What links here" and "Related Changes" to a category

For the "What links here" and "Related Changes" features, only the links in the editable part of the page count, not the links to the pages in the category.

Conventions and project-specific settings

Each page is typically in at least one category. It may be in more, but it may be wise not to put a page in a category and also in a more general category.

Each category, except one top-level category, is typically in at least one higher level category.

Check the conventions in a project and make yourself familiar with the categories in use before assigning pages and subcategories to categories and before creating new categories.

For category names the usual rules for case-sensitivity of page names apply: they are case-sensitive beyond the first character, but in most projects the first character is case-insensitive. So be aware that you create a new category if the capitalization beyond the first character is not the same.

How categories are implemented

Each of the pages in the Category namespace represents a so-called category, a kind of grouping of related pages. For example, this page belongs to "Category:English documentation". When a page belongs to one or more categories, this information appears at the bottom of the page (or in the upper-right corner, depending on the skin being used).

The page of the category contains text that can be edited, like any other page, but when displaying the page, the last part of what is displayed is an automatically generated, alphabetical list of all pages in that category, in the form of links (in fact ASCII order, see Help:Special page).

For a complete list of categories, see Special:Categories. Individual wikis may have their own top-level categories, such as Category:Main page or Category:Fundamental in Wikipedia. For categories in Meta-Wiki, see Meta:Categories.

New categories can be created and edited in the same way as any other regular page¹, but when displayed, an automatically generated, alphabetical list of all pages in that category appears at the bottom.

You can assign a category to an article simply by adding "[[Category:categoryname]]" to the article's wikitext source. Substitute the actual name of the category in place of categoryname.

To be specific, in order to add an article called "Albert Einstein" to the category "People", you would edit the article and add "[[Category:People]]" (no quotes) into its page source somewhere. Exactly where doesn't matter, but the Wikipedia policy, for example, is to put it after the article text, but before any interlanguage links.

Category page note

You can include the template template:category note {{category note}} into the category page's description, which can link to your top level category and include basic help.

here it is for this site

Template:Category note

See also