Docs:Course Structure/CourseNav

From DevWiki
Jump to navigation Jump to search

The wiki provides no intrinsic method to support easy navigation around the course hierarchy (for example, there is no simple way to go from a module page to the page for the theme the module is in). While the processor generates all the appropriate navigation for you when generating standalone course packages, the lack of navigation support in the wiki can make it difficult to get around your material during development. In order to address this issue, a simple template has been provided so that you can easily set up navigation within your course while working in the wiki.

It's important to note two things regarding the CourseNav page for your course:

  1. The CourseNav page is ignored during export and processing. This means that any structure implied in your CourseNav is irrelivant from the point of view of the exporter and processor - you will still need to structure your CourseData, Theme, and Module pages appropriately, and provide all necessary Metadata.
  2. Setting up the CourseNav page will involve duplicating data already specified in your material (ie: you will need to duplicate theme names and module names). This is currently unavoidable, but the huge increase in utility the CourseNav page brings hopefully compensates for the inconvenience of having to duplicate theme and module names.

Setting up navigation in your course

The basic idea behind setting up navigation within your course is:

  1. create a CourseNav page inside your course's namespace
  2. on the CourseNav page, you use the Template:Navbox course template to create a course navigation box.
  3. use transclusion to make the contents of the CourseNav page appear at the bottom of all other pages in your course material.

Step 1 is very simple: add a link to NS:CourseNav on your Course page (replacing NS with the namespace of your course, as always). You can place the link anywhere, and if you're working on a new course it will usually have been added for you as part of setting up your course initially. For an example, see the C:Course page.

Step 2 is slightly more involved, and you should look at the Template:Navbox course page for information about how to create your course navigation box on the CourseNav page. If you need a real example, the C:CourseNav page contains a working course navigation box.

Every time you create a new theme or module in your material, you will need to update the contents of the CourseNav page to reflect the change - it is not done automatically for you at this time!

Step 3 involves adding the following incantation to the bottom of every page in your course. It must appear on its own line, and exactly as shown here, other than the replacement of NS with the namespace of your course:

<noinclude>{{NS:CourseNav}}</noinclude>

This will tell the wiki to include the contents of the NS:CourseNav page. The standard course, coursedata, theme, and module layouts all include the incantation, so any new pages you create will have it added automagically, but you will need to manually add it to existing pages.