Manual:Creating pages with preloaded text/ja

Jump to navigation Jump to search
This page is a translated version of the page Manual:Creating pages with preloaded text and the translation is 67% complete.
Other languages:
English • ‎français • ‎日本語

Preloading wikitext presents the user with a partially created page, possibly with inline instructions for content organization, rather than a blank page. This technique is especially useful when the wiki contains one or more categories of articles, with lots of pro-forma text or the information that needs to be collected for such articles is a mix of structured data and free form text.

Creating pages with preloaded text is a three step process:

  1. Design the preload file and its supporting templates
  1. Create pages for the preload files and supporting templates
  1. Set up the trigger to load the preload file

プリロード ファイルの設計

プリロード ファイルは、多くの場合、テンプレートが埋め込まれた記事です。 例えば、顧客またはマーケティング担当者ごとに 1 つの記事が必要な場合、下記の例のようなテキストをプリロードできます。

   <!-- 等号の後に顧客の連絡先情報を入力してください。
        名刺画像のアップロードについて支援が必要な場合は、[[Help:Uploading business card images]] を参照してください
   |Primary phone number=

プリロード ファイルの命名と文書化

一部の拡張機能には、プリロードされたテキストを保存する場所に関して特定の想定があります。 それ以外の拡張機能は場所の決定を完全にシステム管理者に任せています。

プリロード ファイルは常に「リンク元」に表示されないため、誤って削除される危険性があり、プリロード ファイルの命名と文書化には注意が必要です (情報なし/リンクなし ― 作成されて放棄された記事からのリンクは分かりにくい)。 テンプレート ベースのプリロード ファイルの場合、以下の命名規則が、誤って削除されるのを回避するのに役立ちます:

  • place template in Template:CategoryName
  • place preload file in Template:CategoryName/Preload

Note: before the fixing of タスク T7210, preload templates could not contain documentation, categories, interlanguage links etc.—all content would affect the preload output. With bug 5210 fixed, <noinclude> tags now work as expected.

プリロード ファイルの読み込み

Preloading can be done with a preload parameter in a URL like which links to the edit box of a new page, preloaded with Template:Foo. There are also a number of extensions available to trigger your preload file, see below.

The wikitext of the source page is preloaded into the editbox if the page or section does not exist yet. If the page or section to be edited already exists then only its wikitext is loaded, the preload command is ignored.

  • <noinclude> and </noinclude> tags are removed; if you need the preloaded text to provide noinclude tags, you can use
    in your source: since the two middle tags will be stripped (see next), the preloaded text will end up with just the desired <noinclude>.
  • The <includeonly> and </includeonly> tags are stripped from the source page. If you need the preloaded text to provide includeonly tags, you can use
    in your source: since the two middle tags will be stripped, the preloaded text will end up with just the desired <includeonly>.

Thus there is neither a complete inclusion nor a regular transclusion. See also タスク T7210 (since 2006-03-09).

If it is creating a new section, the initial content of the "Subject/headline" box can be provided with the parameter "preloadtitle"

If it is not creating a new section, the summary can be set with the summary parameter (タスク T19002).

The minor edit checkbox can be set by adding minor parameter


MediaWiki バージョン:

You can also specify parameters to the preload text with the preloadparams[] url parameter (When linking on wiki, you may want to escape the [] to be %5b%5d.) Each parameter specified replaces a $1, $2, ... variable.

Note: $1, $2, ... variables are distinct from {{{1}}}, {{{2}}}, ... variables. In order to use preloadparams[], it appears to be necessary for the template to use $1, $2, ... variables instead of {{{1}}}, {{{2}}}, ... variables. This documentation should be improved by explaining why these two distinct template parameter notations exist, and when it is possible or necessary to use each of the two notations.

For example:


Extensions that trigger a preload file include:

A few extensions also handle all three steps for you:

All extensions related to page creation are in the Page creation extensions category.