Template:Hidden: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Drew R. Smith
No edit summary
imported>Drew R. Smith
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
  -->style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!--
  -->style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:0px;">}}<!--


--><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|<!--
--><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|<!--
Line 16: Line 16:
-->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<!--
-->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<!--
  --><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!--
  --><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!--
  --><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!--
  --><th style="border-left:0px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!--
  -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!--
  -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!--
  -->class="navbox-title"><!--
  -->class="navbox-title"><!--
Line 22: Line 22:


  -->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!--
  -->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!--
  --><div style="float:right;width:6em;">&nbsp;</div><!--
  --><div style="float:right;width:0em;">&nbsp;</div>|<!--
  -->{{#ifeq:{{{state|}}}|plain||<div style="float:left; width:6em;text-align:left;">&nbsp;</div>}}|<!--
  -->{{#ifeq:{{{state|}}}|plain||<div style="float:left; width:0em;text-align:left;">&nbsp;</div>}}|<!--
  --><div style="float:left; width:6em;text-align:left;"><!--
  --><div style="float:left; width:0em;text-align:left;"><!--
  --></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:6em;">&nbsp;</div>}}}}<!--
  --></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:0em;">&nbsp;</div>}}}}<!--


  --><span class="{{{titleclass|}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!--
  --><span class="{{{titleclass|}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!--
Line 34: Line 34:
---Above---
---Above---
-->{{#if:{{{above|}}}|<!--
-->{{#if:{{{above|}}}|<!--
  -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
  -->{{#if:{{{title|}}}|<tr style="height:0px;"><td></td></tr>}}<!--
  --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
  --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
  -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!--
  -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!--

Latest revision as of 23:27, 22 August 2009

This documentation is transcluded from Template:Hidden/doc (edit | history)

This template was originally developed to serve a simple purpose. However, in its development, it grew into something with a much larger function.


Basic Usage

The basic use of this template is to hide text with a [show/hide] link.

Example

{{Hidden
| title = Title Here
| state = collapsed
| list1   = Hidden Stuff
}}

More complex stuff

This template is also capable of making Navboxes, similar to WP's.

Example

{{Hidden
| name  = Hidden/doc
| title = Title
| image = [[Image:KamehamehaI.jpg|80px]]

| above = Above text goes here

| group1 = Who
| list1  = Some Text

| group2 = What
| list2  = [[Some Linked Text]]

| group3 = When
| list3  = [[List Part One]]{{·}} [[List Part Two]]

| group4 = Where
| list4  = Foo{{·}}FooII{{·}}FooIII{{·}}FooIV{{·}}FooV{{·}}FooVI{{·}}FooVII

| group5 = Why
| list5  = Bar

| below  = Website: [http://www.citizendium.org citizendium]
}}

Another Example

{{Hidden
| name  = Hidden/doc
| title = [[Multimedia Super Corridor|MSC Malaysia]]
| image = [[Image:Flag of Malaysia.svg|80px]]

| above = Above text goes here

| group1 = Centre
| list1  = [[Cyberjaya]]

| group2 = Area
| list2  = [[Klang Valley]]

| group3 = Major landmarks
| list3  = [[Petronas Twin Towers]]{{·}} [[Kuala Lumpur Tower]]{{·}}[[Kuala Lumpur Sentral]]{{·}} [[Technology Park Malaysia]]{{·}}[[Putrajaya]]{{·}} [[Cyberjaya]]

| group4 = Infrastructure
| list4  = [[Express Rail Link]]{{·}} [[KL-KLIA Dedicated Expressway]]

| group5 = Prime applications
| list5  = [[EGovernment]]{{·}} [[MyKad]]

| below  = Website: [http://www.msc.com.my/ www.msc.com.my]
}}