Templates for structured content

From WikiEducator
Jump to: navigation, search

Double Vision: Use templates to circumvent a navigation nightmare!

Image courtesy of fotologic


Educational learning materials are typically structured using, for instance, topics and subsections to reflect the logical structure of the content. Alternatively, educators may need to sequence materials according to the sequence of steps required to describe a process.

Example of a hierarchical content structure

A teaching resource on "Big Cats", could, for example use the following structure:

  • Big Cats
    • Tigers
      • Bengal Tiger
      • Siberian Tiger
      • White Tigers
    • Lions
      • African Lion
      • White Lions etc.

In the tutorial on thinking about structure, we learned how to create subpages so for example, the structure above can be implemented using the following wiki text:

[[Big_Cats/Tigers/White_Tigers]] etc.

In the example above, you will see that the topic on Tigers has three subpages (i.e. Bengal Tiger; Siberian Tiger and White Tigers). There are three hierarchical levels in this example. White Tigers" is a sub-page of "Tigers", which in turn is a sub-page of "Big Cats".

The wiki navigation challenge

A wiki is a collection of pages with the ability to link between them. As you know, a wiki has no inherent structure of its own, and finding your way around a content resource can easily become confusing for users. This is particularly true when developing content that has a hierarchical structure as illustrated in the "Big Cats" example above. In more complex structures, navigation can become a nightmare for both authors and users alike. Therefore, WikiEducator has developed a special navigation template for structured content.

The navigation for this tutorial which you find at the top of the page was generated using one of these templates. For illustration purposes we will continue with the "Big Cats" example. We have created an example navigation template for the "Big Cats" structure using the the special features of the template called TopicsWithSubpages:

You can view the syntax for the "Big Cats" navigation template illustrated above. This navigation template can be inserted on any page in the wiki using the following wiki text:


Icon activity.jpg
Testing the "Big Cats" navigation template on your own userpage

Go to your own user page or personal sandbox on your user page and try the following

  1. Insert the following wiki text on your userpage: {{Big_Cats_Nav}};
  2. Click on the "Save" button;
  3. Delete or revert this edit on your own userpage after your experiment

Icon present.gif
  • Navigation templates save time because they can easily be inserted on all pages and subpages of the relevant teaching resource. Moreover, if the content structure changes you only need to update the change in one place which will propagate to all pages using the template;
  • Templates are case sensitive -- make sure that you copy the uppercase and lowercase letters as used in the original template.

Create your own content navigation template

You can create your own structured content navigation template using the special features of TopicsWithSubpages. Use the following steps:

  • Step 1: Create a new template page for your project. Choose a descriptive name for your template, for instance "Big_Cats_Nav" for a navigation template that will be used for a structured teaching resource on Big Cats.
  • Step 2: Manually enter the name of the template into the URL bar of your browser after the http://www.wikieducator.org/ part, then hit enter. In our example you would enter http://www.wikieducator.org/template:Big_Cats_Nav;
  • Step 3: Copy the following text into the template page you created in Step 2 above;
|state =
|title =
|image =
|above =
|topic1 =
|section1 =
|topic2 =
|section2 =
|topic3 =
|section3 =
|below =
  • Step 4: Click on the save button;
  • Step 5: Fill in the variables for state, title, image, above, topic1, section1 etc using the instructions provided on the TopicsWithSubpages. Refer to the example below.
  • Step 6: Click on the save button.
  • Step 7: Insert the template on every page where you want the navigation template to appear. In this example you would insert {{Big_Cats_Nav}} to call the template.

Example of a structured content template

The following template provides a good example of the navigation WikiEducator recommends for structured teaching materials (this is based on a special template called TopicsWithSubpages):

An example of a TopicsWithSubpages navigation template showing the relationship between the syntax variables and final display
Icon present.gif
  • You must use the {{Vbar}} syntax to insert the vertical bars ("|") between page links in the navigation template, otherwise the template will not work.
  • You can use the standard wiki syntax for page links and images.
  • The variables (i.e. title, image, topic1, section1, topic2, etc.) are optional. You can leave these blank if you like.
  • Make sure that there are no line or page breaks between the individual pages -- this will break the navigation template.
  • If you make a mistake -- don't worry this is a wiki and mistakes are easily fixed.