User:BrentSimpson/NavTemplates
From WikiEducator
Contents
see:
- w:Wikipedia:Navigational_templates
- http://meta.wikimedia.org/wiki/Help:ParserFunctions
- w:Wikipedia:Collapsible_tables
Version #1: Topics with Subtopics
Simple syntax for adding Topics and Subtopics. Also uses collapsible table. Syntax would either need to be cut'n'pasted into each page, or I may experiment with using an inputbox to create a unique template for a project which may then be transcluded into pages using the standard syntax to include/transclude templates.
These instuctions are somewhat deprecated See: Template:TopicsWithSubpages for more up-to-date info.
Pages Used
- Template:TopicsWithSubpages
- Template:TWSbase - used by the above
- MediaWiki:Common.css - css that is unique to these templates goes here.
- MediaWiki:Common.js - javascript for the collapsing tables is here.
Working Example
Edit page to view syntax.
Test of a Navigation Template with Topics and Subtopics | ||
---|---|---|
Welcome to this content! | ||
What is a wiki? | Advantages and Disadvantages | About WikiEducator | Summary and FAQS | |
Creating an Account | Benefits | Instructions | |
Topic Three | blah blah blah | |
Some text that could go on the bottom. Including links to Content. |
Syntax that produced the above
{{TopicsWithSubpages |state = (either left blank, collapsed, or plain can be entered here.) |title = Test of a Navigation Template with Topics and Subtopics |image = [[Image:tutorial.png|32|]] |above = Welcome to this content!
|topic1 = [[Wikieducator_tutorial/What_is_a_wiki|What is a wiki?]] |section1 = [[Wikieducator_tutorial/What_is_a_wiki/Advantages_and_disadvantages|Advantages and Disadvantages]]{{Vbar}} [[Wikieducator_tutorial/What_is_a_wiki/About_wikieducator|About WikiEducator]]{{Vbar}} [[Wikieducator_tutorial/What_is_a_wiki/Summary_and_FAQs|Summary and FAQS]]
|topic2 = [[Wikieducator_tutorial/Creating_an_Account|Creating an Account]] |section2 = [[Wikieducator_tutorial/Creating_an_Account/Benefits|Benefits]]{{Vbar}} [[Wikieducator_tutorial/Creating_an_Account/Instructions|Instructions]]
|topic3 = [[Topic Three]] |section3 = blah blah blah etc, etc, etc, ... |below = Some text that could go on the bottom. }}
Problems / Issues
- can't use | to seperate out the subtopics because it is interpreted as part of the template; may be able to put in later as part of syntax .. but probably not. Only solution may be to make a template of the | page and transclude it, ie. {{Vbar}}
These instuctions are somewhat deprecated See: Template:ProjectNav for more up-to-date info.
Syntax:
{{ProjectNav |image = |title = My new project |tagline = Because sometimes you've just got to start a new Project! |pages = [[One]]{{Vbar}} [[Two]] }}
Problems / Issues
-
change use of H1 for bolding, etc as mediawiki wants to style these as part of main.css.