Hey guys! I think it's about time I'd written my first blog on Community Central. Today's topic is going to be about how to add multiple custom edit layouts to be used when creating new pages on your wiki.

Why Custom Layouts?

Creating new pages is already difficult enough without having to go to template pages collecting parameter names or looking at another page to make sure headers are ordered and leveled correctly. Custom layouts speed the process of creating new articles by having the skeleton of the page already formed and waiting.

Create Your Layouts

The first thing to do is to create a MediaWiki page for each layout you wish to have in easy reach for the community. Be sure to name your pages neatly and consistently for easy reference later. Add your formatting, templates, and default text to your newly created page. You can even include comments to guide editors.

In my example I created five custom layouts:

Add Preload URLs

After the layouts are created, you must create preload URLs for each. To do so, edit your MediaWiki:Newarticletext to include the following being sure to replace Example1, Example2, etc with your layout pages.

<div style="margin-top: 0px;" class="emptymwmsg mediawiki_newarticletext"></div>
Click to create a new [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-Example1pagelayout}} Example1], [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-Example2pagelayout}} Example2], [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-Example3pagelayout}} Example3], [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-Example4pagelayout}} Example4], or [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-Example5pagelayout}} Example5] page.

My example:

<div style="margin-top: 0px;" class="emptymwmsg mediawiki_newarticletext"></div>
Click to create a new [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-episodepagelayout}} Episode], [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-DVDpagelayout}} DVD], [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-albumpagelayout}} Album], [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-songpagelayout}} Song], or [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=MediaWiki:Custom-bookpagelayout}} Book] page.

Using Your Layouts

Custom Layouts Message

New Article Text Message

Now that we have created our layouts and preload URLs, let's use them. First thing to do is to create a page just like any other. Type in the name of your page and choose either the standard layout or the blank page as the page's initial formatting doesn't matter. Once you are at the edit menu you should see a message above the edit box informing you to click a link to create that type of page. Click the desired formatting and you will be redirected to another edit screen, but this time your formatting and templates will be loaded for you to finish your page with ease.

Additional Resources

Don't wish to create layouts this way but are good with Javascipt? Check out Custom edit buttons.