個別 Wiki におけるナビゲーション (Navigation) とは、すべてのページの最上部に表示されるヘッダー・メニューのことを指します。ナビゲーションは Wiki の中で最も重要なページや興味深いページをリストアップした便利なリンク集です。ナビゲーションのメニューをよく作りこんでおくと、読者が探している重要なコンテンツを見つけやすくなります。

Wiki のナビゲーション・バーをどのように構成するか、どのコンテンツを載せるか判断するには、訪問者の立場に立って考える必要があります。訪問者が何を求めているのかを考え、できるだけ多くの関連性のある Wiki コンテンツへ直線的に移動できるようにしましょう。

訪問者のほとんど全員が、記事を作るためではなく読むためにあなたの Wiki にやって来ていることを忘れてはいけません。編集者は Fandom の訪問者のうちわずか 0.05 パーセントに過ぎず、彼らの努力なしに Wiki は存在しえないとはいえ、ナビゲーションは何よりまず読者に向けたものでなければいけません。素晴らしいコンテンツを作るのは編集者の役目、それを見つけやすくするのがナビゲーションの役目です。編集者が作業のために必要とするツールは、下部ツール・バー等のその他のサイト要素を使うとよいでしょう。

ナビゲーション・バーのデフォルト設定

Local wiki navigation

ナビゲーション・メニューは Wiki の全ページの最上部に表示されます。「検索」「ディスカッション」メニューと、カスタマイズ可能な4つのメニュー項目からなります。

  • 「検索」タブは常にナビゲーションに表示される項目で、ディスカッション(機能が有効な場合)、ページ一覧インタラクティブマップコミュニティ(機能が有効な場合)、ブログ(機能が有効な場合)、おまかせ表示動画画像など、Wiki にとって重要なリンクが並んでいます。一部のコミュニティでは「検索」タブのなかに「Shop」項目が表示されていたり、個人設定によっては一番上の項目がメインページへのリンクの場合もあります。個人設定による影響を除き、このタブはカスタマイズの対象ではないため、メニューを追加することはできません。
  • 「ディスカッション」ボタンは、Wikiのディスカッションにリンクしています。
    • 注意:ディスカッション機能が無効になっている場合、「ディスカッション」ボタンは表示されません。
  • 「メインページ」ボタンは、Wikiのメインページにリンクしています。
    • 個人設定の初期ページをデフォルトのまま「メインページ」に設定しているユーザーは、ワードマークやサイト名をクリックするだけでメインページにリンクします。これが読者たちも共通で経験するデフォルト設定です。
    • 個人設定の初期ページを「最近の更新」に設定しているユーザーは、「検索」タブを開いたとき一番上に「メインページ」のリンクが表示されます。ワードマークやサイト名をクリックすると最近の更新にリンクします。
    • 個人設定の初期ページを「コミュニティ・フィード」に設定しているユーザーの場合、「ディスカッション」リンクの代わりに「メインページ」リンクが表示されます(ディスカッションが無効化されている場合は、「メインページ」リンクが新たに追加される形になります)。ワードマークやサイト名をクリックするとディスカッションにリンクします。
  • 右側のヘッダー背景画像はテーマデザイナーからアップロードすることができます。
  • 右上にはページ数と、各種ツールにリンクしている複数のボタンが表示されています。「新しいページをつくる」ボタンは全ユーザーに表示されます。また登録ユーザーにはその右隣に「最近の更新」やさらなるショートカットが表示されます。アドミンの場合はアドミン・ダッシュボードのボタンも表示されます。
  • 左側には画像のワードマークとコミュニティの名前が表示されます。デフォルトでは Wiki のサイト名がテキストで表示されていますが、ワードマークもテキストもテーマデザイナーからカスタマイズ可能です。

ナビゲーションのカスタマイズ

項目の編集

ナビゲーションの編集

ナビゲーションの編集

コミュニティのアドミン (管理者) はそれぞれの Wiki の MediaWiki:Wiki-navigation からナビゲーションのメニューを編集することができます。アドミン・ダッシュボードの「トップナビゲーション」のボタンがこのページへリンクしています。

MediaWiki:Wiki-navigation のページでは、ナビゲーション・バーの各項目がリスト形式で表示されています。たとえばレベル1の項目は半角アスタリスク1つ (*) 、レベル2なら半角アスタリスク2つ (**) といった具合です。

Each item in the navigation bar is represented by a line in the MediaWiki:Wiki-navigation page. Similar to bulleted list syntax, level 1 items are prefixed with one asterisk (*), level 2 items are prefixed with two asterisks, level 3 items are prefixed with 3 asterisks, and level 4 items are prefixed with 4 asterisks. Like so:

*|Wiki Content
** #newlychanged#|Recently Changed Pages
** #category1#
** #category2#
*|Community
**Help:Contents|Help

After the asterisk(s), type the name of the target page you are linking to. The target can be the name of a wiki page (interwiki prefixes are allowed here), a URL (to pages on the web), or the name of an interface message (without the MediaWiki: prefix). When using a system message, the item will be replaced with the contents of that message, first checking for existence of a localized version.

If you want the link text to display differently than the page's actual name, set a pipe | between the name of the page and the text you want to display. For example, if you are linking to a page called Lion but you want to display it as Kitten, use Lion|Kitten after the asterisk. The link text also supports system messages. When the link text is omitted, the link target will be used as the text.

The #category# form is to autopopulate a drop-down-style menu with pages under the category in question. (Note the space character at the beginning).

If you don't want a navigation item to link to anything, you can do one of the following:

  • Use an empty link target, e.g. |Movies.
  • Use # as the link target, e.g. #|Movies. Any text after the # but before the | will be ignored.
  • Prefix your link with the text __NOLINK__, e.g. __NOLINK__Movies. This keyword will be interpreted as a #|

When using either of these methods, the resulting link will point at the current page, with an empty hash parameter in the URL. Depending on your browser, these links will only scroll to the top of the current page, instead of navigating to a different page. There is no built-in way to generate a navigation that completely omits a link.

To demonstrate different ways of formatting navigation items:

For example, a navigation bar set to:

*|Movies
**Prequel trilogy
**Sequel trilogy
*|Video games
**First video game
**Second video game
**|In Development
***Untitled Third Video Game|Third game
***Spin-off (Game)|Recently announced spin-off title
*Patch notes#Patch_16.0|New in 16.0


will contain:

  • First two Level 1 navigation items, Movies and Video games, that aren't linking to any pages. The last Level 1 navigation item, Patch notes#Patch_16.0, links to page Patch notes section Patch 16.0, while displaying New in 16.0.
  • Five Level 2 navigation items, two being under Movies and linking to Prequel trilogy and Sequel trilogy pages on your wiki, and three being under Videogames and linking to First videogame and Second videogame, with In Development not linking to anything.
  • Two Level 3 navigation items under In Development, first linking to the Untitled Third Video Game page on your wiki and displaying the text Third game, and a second one linking to Spin-off (Game) and displaying the text Recently announced spin-off title.

After you make your changes, review your changes and save.

Common issues

Certain names that match existing MediaWiki system messages will display the contents of the message instead of the written name. For example, if you want to use the word "Others" (with a capital letter), it will show as "others". This is because it matches the system message MediaWiki:Others, and is replaced with contents of that message. This can be avoided by adding a non-breaking space to the end of the word (for example, Others ) - this prevents an exact match to the MediaWiki message.

The affected names include, but are not limited to: About, Ask, History, Leaderboard, Others, Portal, Subject, Tags, Talk, and Translations.

A list of all system messages can be found at Special:AllMessages.

Including a system message as the only value (with no pipe next to it) will use the contents of the message as the label, and the title of the message as the link. For example *aboutme will generate the same as *Aboutme|About Me, linking to the main namespace page "Aboutme".

Lines that do not immediately start with an asterisk * are ignored (e.g. entries starting with a space). This can be used to add comments to your navigation.

If you want to link to a section on a page, use a percent-encoded hash in place of the hash character, e.g. Movies%23Action to link to the "Action" section of the Movies page.

If using a percent-encoded hash to link to a section doesn't work, you can also link your navigation item to a new page (e.g. Patch notes new) and have that page redirect to the desired page section (e.g. #REDIRECT [[Patch notes#Patch_16.0]]).

The navigation is cached. This means changes to any links will not immediately appear for all users, only after some time has passed and the cache has been refreshed. Purging the cache should expidite this process.

The navigation supports parser functions, however its use is not recommended. This would allow you to have navigation items that are able to change or be entirely omitted depending on a condition. For example, the following shows a different item for the navigation bar on a User, File and Main namespace page, and no item for other namespaces.

{{#switch:{{NAMESPACENUMBER}}
|2=** {{!}}This is the user namespace
|6=** {{!}}This is the file namespace
|0=** {{!}}This is the main namespace
|}}

次のページ

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