Template:TopicsWithSubpages

From BCcampus Mediawiki
Jump to: navigation, search
{{#if:|}}{{#if:|{{#if:|{{#ifeq:|true|}}}}{{#if:|}}{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|}}



Using Template:TopicsWithSubpages

This Navigational template may be useful for complex content that has a hierarchical structure to it such as:

Topic 1
         section 1
         section 2
Topic 2
         section 1
         section 2


When inserted into a page it might look something like this:

{{#if:Welcome to our new content project!|}}{{#if:Advantages and Disadvantages |About WikiEducator |Summary and FAQS|{{#if:|{{#ifeq:|true|}}}}{{#if:What is a wiki?|}}{{#if:File:Tutorial.png|}}}}{{#if:Benefits |Instructions|{{#if:Creating an Account|}}}}{{#if:section 1 |section 2 |section 3|{{#if:Topic Three|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:|{{#if:|}}}}{{#if:Some text that could go on the bottom. Including links to other Content or sections.|}}



For another example of the template in action see the pages of Using Audacity.

(For a simpler template suitable for WikiEducator projects see: Template:ProjectNav.)

Syntax

{{TopicsWithSubpages
|state =
|title =
|image =
|above =

|topic1 =
|section1 =

|topic2 =
|section2 =

|topic3 =
|section3 =

|below =
}}

Variables

The template has the following variables:

state = can be either left blank, or collapsed or plain can be entered here. Blank (ie. nothing entered) is the default and will provide the user with a way to collapse the navigation template with a show/hide link; collapsed will default the navigation template into the collapsed or closed state; and plain removes the show/hide option all together.

title = This is the title of the resource. Can be left blank.

image = You can include an image or logo to display in the template. Uses normal wiki image syntax.

above = Text to go in the header cell of the template. In the above example the text: "Test of a Navigation Template with Topics and Sections" is here.

topic1 = this would be a link to your first Topic.

section1 = this may be series of links separated by {{Vbar}} of the sections for topic 1.

topic2 = to add new topics increment the number; ie. topic2, topic3.

section2 = sections/pages for the topic2 table cell.

below = text that could go at the bottom of the navigation box.

Automated Creation of TopicWithSubpage Navigation for projects

Instead of copying and pasting all the template syntax into every page of your content, it may be easier to use this form to create a unique navigation template for your all of your content pages. You can then insert this newly created navigation template into each page of your content using a greatly simplified syntax. This also makes it far easier to modify the navigation in a single place (ie, add or subtract pages, etc.) and have changes reflected in all pages rather than having to modify the syntax in every page.

Usage

Replace the MyProjectNav text below with the name of your project, something like Template:AccountingBasicsNav and click on the Create New Navigation Template button. You will be taken to a page with further instructions.

<inputbox>

 type=create
 preload=TopicsWithSubpages
 editintro=TopicWithSubpagesInstructions
 buttonlabel=Create New Navigation Template
 bgcolor=#eeeeff
 width=45
 default = Template:MyProjectNav

</inputbox>