[Mediawiki-l] Advice on templating

Ross McKay rosko at zeta.org.au
Mon Feb 18 01:25:48 UTC 2008


Rob Sharp wrote:

>I'm seeking a little advice on the use of Templates.

Sounds like you want templates + boilerplates.

>[...]
>I'd like to standardise the layout of this documentation with regards 
>to the basic information that needs entering. I thought I could 
>provide a layout framework via a template, give people the basic 
>information on how to include the template and they could then fill in 
>the included template.

For simplicity (I like simple) you can create some boilerplate pages
containing the templates you want them to fill in, and use the Inputbox
extension to let them create pages based on the boilerplate, like this:

<inputbox>
type=create
default=Namespace:Module Root/CHANGE THIS TITLE PLEASE
preload=Namespace:Module Root/boilerplate
buttonlabel=Create a new page in Namespace:Module Root
</inputbox>

Obviously, change Namespace:Module Root to the namespace and module root
to suit your application, e.g. for a page in the main namespace, as a
sub-page under Quotes, you might do this:

<inputbox>
type=create
default=Quotes/CHANGE THIS TITLE PLEASE
preload=Quotes/boilerplate
buttonlabel=Create a new quote
</inputbox>

Of course, Adam Meyer's "easy edit" is very much nicer!
-- 
Ross McKay, Toronto, NSW Australia
"Nobody ever rioted for austerity" - George Monbiot



More information about the MediaWiki-l mailing list