Wikieducator rich text editor tutorials/Navigation templates/Creating a template

If you're not sure of the answers to these questions yet, then you are probably not ready to proceed with this tutorial. Many content developers find it easier to create and insert their navigation templates after the basic structure becomes apparent once a few content pages have been created. The Tutorial on developing a teaching resource in WikiEducator is a good starting point for planning a content project.

A three-step process
Creating and using templates is a three step process:


 * 1) First you need to create a new template page;
 * 2) Then you need to generate the content for your template and save the template page;
 * 3) Finally, you need to insert a reference on your content pages in the main wiki namespace to call the content from your template.

Creating a template page
To create a template you need to create a page with Template: as the first part of the name. Up to now, we have created new pages in the wiki by making a link in some content to a page that doesn’t exist yet, then following the resultant red link to edit the new page (see for example: Creating new pages).

Templates are a little different because we are not really creating a link to the template itself, but will reference it on an existing content page. So we first need to create the template page before we can use it on a content page.

The easiest way to create a new template is to manually enter the name of the template into the URL bar of our browser after the http://www.wikieducator.org/ part, then either hit enter or the Go button. Like this:





Inserting a reference to call your template on a content page
Your template is just like any other wiki page and can contain any wiki markup or HTML code. In the previous activity you saved a temporary text which you can use to test whether your template is working. On the wiki page where you want to call the content saved in your template, you enter the name of your template between two curly braces. So for example, if the name of your template was Gardening_Nav, you would enter the following syntax on the relevant content page:



Choosing the right type of navigation template
WikiEducator has prepared special navigation templates to simplify implementation and to encourage a consistent look and feel of our content pages. These special templates are easier to use because you can cut and paste the syntax without needing to worry about more complex html formatting. We have two generic template formats, so before you proceed you should decide on the type of navigation template you want to use:


 * 1) Navigation for project nodes or community hubs in WikiEducator (like the Learning4Content initiative) -- In this case you should proceed with section on templates for project and community nodes;
 * 2) Navigation for structured content with sections and subsections (like the navigation used for Developing a teaching resource -- In this case you should continue with the section on templates for structured content.