Jump to content

Help:Creating and using editintro and preload templates

From Wikinews, the free news source you can write!

See Also: mw:Manual:Creating pages with preloaded text and mw:Manual:Parameters to index.php#Options_affecting_the_edit_form

Mediawiki has a feature where a specific page could be preloaded into the edit box when creating a new page. This can be used to help new users create pages with the apropriate syntax. Another feature of mediawiki is to have editintro's to give instructions to newbies. These page help guide editors in the creation of pages.

The features described on this page might not work when accessing the site from a mobile device. Dialog may offer a more robust, as well as more flexible, alternative.

[edit]

There are two main ways to use this feature. First of all through urls using the editintro and preload parameters. For example http://en.wikinews.org/w/index.php?editintro=Help:Creating_and_using_editintro_and_preload_templates&action=edit&preload=Wikinews:Archives&title=example_new_page Will go to a new page creation form, with this page at the top of the page, and Wikinews:Archives preloaded to the editbox. You can change the pages preloaded/editintroed by changing the corresponding parts in the url. If you are using section=new to create a new section, you can also use the parameter preloadtitle= to specify the name of the new section as well. See mw:Manual:Parameters to index.php#Options_affecting_the_edit_form for more information.

Using the inputbox extension

[edit]

The second method is to use an inputbox. For example, the following code:

<inputbox>
type=create
preload=Template:New_page
editintro=Template:New_article_intro
width=40
</inputbox>

Will create a create new article inputbox, with template:New page preloading into the editbox, and {{New article intro}} transcluded just before the edit box. See mw:Extension:InputBox for more information. Try it yourself:


On preloaded pages

[edit]

Since the entire wikitext is copied into the editbox, Using <noinclude> and similar things does not work. (The exception being <includeonly> does work [as in it causes the enclosed content to be included in the editbox only]. If you want includeonly to be included in the text copied to the edit-form, use <include<includeonly/>only>). Thus all documentation of preload template pages should be on the talk page. Please use the template {{Editbox Preload Template}} on the talk page of any preload pages so such pages can be included in category:Preload templates. See also Category:Editintro templates and {{Editbox Intro Template}}.