コミュニティセントラル
ヘルプ
このヘルプには更新、または翻訳されていないコンテンツがあります。どなたでも翻訳にご協力いただくことができます。
原文 : w:Help:Category
CategoriesUnfurled

Categories seen at the top of the page, including a view of the drop-down when you click on "more"

A category is a navigational tool used in MediaWiki to group similar pages together and structure the wiki, making it easier to explore and use. They can be used to group not only articles, but also templates, images, and even users.

Categories can be found in the article header[1] and at the bottom of the page.

カテゴリの必要性

カテゴリ (Category) は、コンテンツをテーマごと(例えば、登場人物、書籍、場所など)にグループ化して、使い易い形で並べてくれます。カテゴリはどのページにも入れることができ、カテゴリが加えられたページは、自動的に他の関連するページとともにカテゴリページに加わります。

カテゴリは、各コミュニティのコンテンツを閲覧者が関連したコンテンツを見つけやすいように整理してくれます。どのページにも最低1つはカテゴリが入っているというのが理想的です。カテゴリ自体も他のカテゴリに属することができます。例えは「登場人物」というカテゴリの中に、「主要人物」、「男性」、「女性」などをサブカテゴリとして加えることもできます。

各ページの一番下には、「さらに読む」のセクションがあり、関連したページをすぐに見つけられるようになっていますが、これらはそれぞれのページのカテゴリのタグをもとに選ばれ、表示されています。カテゴリが詳しければ詳しいほど、このセクションでより関連したページが表示されるようになります。

カテゴリの追加

ページにカテゴリが追加されると、カテゴリページでそのページが表示されます。To add a category, begin by going to the page you wish to categorize. Then use either the category module at the bottom of the page or an editor, to add your category.(カテゴリページからは、各ページにカテゴリを追加することはできません。)

ページ上のカテゴリモジュールから追加

Category Module

This is category list, located under article, where there is "Add Category" button

カテゴリモジュールを有効にしていると、編集モードに入らなくても、各ページの下の部分でカテゴリを追加することができます。

  • カテゴリを追加」をクリックし、追加したいカテゴリの名前を入力します
  • 既にあるカテゴリは候補として提案されます。新しいカテゴリを追加するにはそのまま入力し続けます
  • 完了したら「保存」をクリックします。カテゴリへのリンクがページに表示されます


注意:すでにあるカテゴリの削除や変更は、編集モードで行うことができます

この機能の利用をご希望でない場合には、個人設定にて無効にできます。「編集」タブより、「カテゴリモジュールを無効にする」ボックスをチェックして保存してください。

編集モードで追加

There are various ways to add categories while editing the wiki, depending on which editor you use.

UCP editor categorization

エディタ上でのカテゴリの変更、削除

The editor allows for switching between Source Editing and Visual Editing.

Visual Editor
In Visual Editing mode, you can click on the Categories button in the drop-down menu on the right. This opens the category dialogue, which allows you to edit categories, add new ones, and optionally customize how the article should be sorted.
Source editor
ソースモードでは、カテゴリ名をリンクと同じように入れることができます。ページの最後に[[カテゴリ:]] (または[[Category:]]) と入力し、コロンと括弧の間にカテゴリ名を入れます。
[[カテゴリ:カテゴリ名]]
例えば、ヘルプカテゴリを追加するには、[[カテゴリ:ヘルプ]] となります。

To commit changes, simply save the page.

How to sort articles in categories?

  • When clicking the edit icon next to category names, you can define a "sortkey" for that category. This sortkey defines at what point the article appears in a category page's listings, e.g., sort a first last name page under last name.
For example, you can use [[Category:Help]] to add a page to the Help category. To customize the sorting, you can use [[Category:Help|Custom name]] or [[Category:Help| ]] to force the article to display at the top of the page.
  • If an article example is an introduction for category example, a blank (space) or * (asterisk) sortkey puts it near the beginning of the category.
  • If the article is in many categories, you can add {{DEFAULTSORT:<sort key>}} in the article while editing in source editor to sort the article in all the categories the same way. This will save you from having to edit each category's parameters individually.

高度な機能

表示順設定機能
エディタ内でカテゴリの編集ボタンをクリックすると、「表示順」に関する設定をすることができます。ここで、カテゴリページのどの部分にそのページを表示したいかを設定することができます。例えば、ページ名が漢字で始まる場合、ページはその一文字目の漢字によって表示順が決まるため、カテゴリページでページを五十音順で表示したい場合には、ここでひらがなを入力する必要があります。

カテゴリページの使い方

Categorical Pseudo-existence

When pages are in a category that hasn't been fully created

全てのカテゴリは、ページの最後にある「カテゴリ」というボックス内に表示されます。それぞれのカテゴリ名をクリックすると、そのカテゴリ内の全てのページとサブカテゴリがリストされたカテゴリ解説ページに飛びます。カテゴリ解説ページの上にある"編集"をクリックすると、サブカテゴリリストの上のページトップにテキストや画像を追加し、そのカテゴリを他のカテゴリに入れることができます。

カテゴリ解説ページは、通常のコンテンツをおさめるようにはデザインされていないことに注意してください。カテゴリは、記事統計に含まれず、また多くの特別ページで検索などの対象から外れます。

カテゴリページの作り方

例えば「登場人物」のカテゴリをページに加えると、自動的に「カテゴリ:登場人物」というカテゴリページが作られます。カテゴリを記事ページに追加した後、カテゴリ名をクリックすると、このカテゴリページを見ることができます。

もしカテゴリ上にテキスト等を入力したい場合(例えばそのカテゴリの説明など)、カテゴリページを編集します。他の記事ページと同じ方法で編集し、公開します。入力したテキストはそのカテゴリに属するページのリストの上に表示されます。

サブカテゴリの作成方法

カテゴリ解説ページを編集してカテゴリタグを追加すると、追加したカテゴリを"上位カテゴリ"として、そのカテゴリをサブカテゴリとすることができます。各カテゴリが含むサブカテゴリの数やカテゴリの深さに制限はありません。あまり意味のあることではありませんが、カテゴリを"ループ"させることもできます。

全てのカテゴリのうち、ウィキ内で最上位に位置するカテゴリをは"ルートカテゴリ"と呼ばれます。常に完全なカテゴリツリーを構築する―ウィキ内の全てのカテゴリをルートカテゴリのサブカテゴリもしくはその下の階層のカテゴリとする―ようにしておきましょう。

カテゴリページにリンクする方法

ページをカテゴリに入れずカテゴリページそのものに内部リンクさせるには、"Category"の前にコロンを入力する必要があります。

[[:カテゴリ:カテゴリ名]]

カテゴリを他のカテゴリにリダイレクトさせる

カテゴリをリダイレクトさせることは、技術的には可能ですが、ページの再分類が正しく行われません。そのため、他のカテゴリ名を使うべきだと知らせるTemplate:Category redirectのような注意文をカテゴリページに追加するのがよいでしょう。新しいカテゴリに全てのページを移動させた上で古いカテゴリを削除することもできますが、事情を知らない他のユーザーが古いカテゴリを再作成してしまうことがあるため、削除はせずにこういったテンプレートを残しておくのが良いでしょう[2]

カテゴリページの削除

カテゴリを削除するには、まず、そのカテゴリが加えられた全てのページのからカテゴリタグを外します。

アドミンの方は、通常の記事ページの削除と同様の方法でカテゴリページを削除することができます。

コンテンツが何もないカテゴリページでは、「このページはコンテンツを必要としています」と表示されます。そのようなカテゴリページを削除する場合、そのカテゴリを追加したページからカテゴリタグを外すことでカテゴリは削除され、特別:カテゴリにも表示されなくなります。このサムネイル画像は通常、その記事ページで最初に使われている画像です。

カテゴリの表示

There are several ways a category can be displayed. Anonymous or logged-out users will only be shown the dynamic, default category layout, while registered users can switch between them and select a default one.

You can change your preferred layout through the preferences page:

  • Open the My Info tab.
  • Scroll down to the Appearance section.
  • Use the drop-down next to Category page layout to select your preferred layout.
  • Save your preference changes.

You can also switch between layout options by using the layout buttons in the top-right corner of the page.

Note that the category display options do not affect the contents of the category page itself, they only affect how pages listed in the category are depicted. The category's contents (description, images, etc.) will always display first.

Dynamic categories

This is the default layout for anonymous and logged-out users.

The first section is an image gallery similar to the one used by the classic categories layout. Although similar in layout, the galleries may feature different pages due to a difference in selection criteria. The gallery for dynamic categories cannot be disabled.

The second section contains a count of the total number of list items and a list of up to 200 items. The list contains both subcategories and pages sorted alphabetically by sortkey. The list is organized into two columns and, where possible, each item contains an image from its respective page. Above the list is a series of links that allow the viewer to skip to a specific letter in the alphabet. Below the list, next and previous buttons are displayed.

Classic categories

The first section is a list of subcategories and the second section is a list of pages. The layout of the lists is similar to each other. If a list has no items to display, its section is not displayed. The sections contain a count of the total number of list items and a list of up to 200 items.

If there are more than 200 items in the list, links to view the next/previous items will be placed both above and below the list. The list is organized into as many as three columns and sorted alphabetically by sortkey. If the CategoryTree extension is enabled (it should be by default), the subcategory list will display each item as a category tree instead of a link to the category page.


次の手順

さらに高度な解説

関連情報

その他のヘルプとフィードバック

脚注