Template:ArticleSpawner

From PathfinderWiki
Template documentation (for the above template, sometimes hidden or invisible)

{{ArticleSpawner}} helps you create a button that, preloads a page's edit box with appropriate content, such as an infobox, section headers, content suggestions, and placeholder categories.

Usage

{{ArticleSpawner
| articleType  = 
| buttonlabel  = 
}}
articleType
The type of article. Valid article types should align with available infoboxes actively used on content pages, such as {{Adventure}}, {{Creature}}, {{Biography}}, etc. Each articleType should have a corresponding preload template that exists at Template:ArticleSpawner/(articleType). Note that this is case-sensitive, and articleTypes generally start with capital letters.

Examples

{{ArticleSpawner
| articleType = City
}}

results in

Entering an article name and clicking the "Create new City" button opens a new edit page with the contents of Template:ArticleSpawner/City preloaded in the edit box, and the contents of Template:ArticleSpawner/City/doc appearing above the edit box.

Creating new article types

Creating a new article type for use with {{ArticleSpawner}} is easy!

  • Create a new page at Template:ArticleSpawner/articleType. For instance, to create an articleType for Dice set, create a page at Template:ArticleSpawner/Dice set.
  • On this new page, enter the wikitext you'd want to see preloaded in the edit box when creating a new article of that type with an {{ArticleSpawner}}. This can be infobox templates, section headers, categories, and anything else that you'd put on a new article of that type. To add notes for editors inside the wikitext, use HTML comments (<!-- text wrapped like this -->).
  • Wrap all content on the preload template page with a <includeonly> tag at the very top and a </includeonly> tag at the very bottom. This prevents the template page itself from showing up in categories, including any autocategorized categories applied by things like infobox templates. (Don't worry—the <includeonly> tags themselves won't show up in the preloaded text. If you want <includeonly> or <noinclude> tags to show up, break them up with <includeonly> tags that have nothing between them: <no</includeonly><includeonly>include>. The <includeonly> tags will disappear during prepopulation, leaving only the <noinclude> tag.)
  • (Optional) To show a custom editing guide above the edit box, create a page at Template:ArticleSpawner/articleType/doc. It helps to keep this documentation short so the editing box is easily accessible; see Template:ArticleSpawner/City/doc for an example that uses a {{Userbox}} and content from a Help page.

That's it! You can now create an {{ArticleSpawner}} that uses your articleType as a parameter; in this example, {{ArticleSpawner|articleType=Dice set}} would now work.