Difference between revisions of "Template:Div"

From PinataIsland.info, the Viva Piñata wiki
Jump to: navigation, search
m (Template:Tab moved to Template:Div over redirect: previous name was better)
m (rv/ broke transclusions in the test articles)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}}
+
<noinclude>
|svp|specclassic=<div class="pii_species_content_container"><div class="pii_species_classic_content">
+
==Usage==
|svp2|specvp2|stip=<div class="pii_species_content_container"><div class="pii_species_tipStd_content">
 
|sjff|specjff=<div class="pii_species_content_container"><div class="pii_species_tipJff_content">
 
|svpp|specvpp=<div class="pii_species_content_container"><div class="pii_species_pp_content">
 
|stv|spectv=<div class="pii_species_content_container"><div class="pii_species_tv_content">
 
|avp|artclassic=<div class="pii_article_content_container"><div class="pii_article_classic_content">
 
|avp2|artvp2|atip=<div class="pii_article_content_container"><div class="pii_article_tip_content">
 
|avpp|artvpp=<div class="pii_article_content_container"><div class="pii_article_pp_content">
 
|atv|arttv=<div class="pii_article_content_container"><div class="pii_article_tv_content">
 
|req|require=<div class="pii_species_requirements">
 
|tabs|headertabs|end=<headertabs/>
 
|1=</div>
 
|close|2
 
|#default=</div></div>
 
}}</includeonly><noinclude>
 
==Paramaters==
 
  
{| style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; padding: 0.2em; text-align:center; width:600px;"
+
This template is used to create page tabs.
  
! Paramater !! Result !! Shorthand !! Longhand
+
There are two parameters, the first being the type of page (article, species, or plant) and the second being the platform (and gametype, if applicable). It will default to a Trouble in Paradise article if no parameters are supplied.
  
|-
+
This template should be '''subst:'ed'''.
|svp
 
|Classic species tab
 
|<nowiki>{{div|svp}}</nowiki>
 
|<nowiki>{{div|specclassic}}</nowiki>
 
  
|-
+
<pre>
|svp2
+
Articles
|Trouble in Paradise species tab
+
--------
|<nowiki>{{div|svp2}}</nowiki>
+
classic              {{subst:div|article|classic}}
|<nowiki>{{div|specvp2}}</nowiki>
+
trouble in paradise  {{subst:div|article|tip}}         //default - if no parameters are passed
 
+
    - Standard      {{subst:div|article|tipStd}}
|-
+
    - Just for fun  {{subst:div|article|tipJff}}
|sjff
+
pocket paradise      {{subst:div|article|pp}}
|TIB: Just for Fun species tab
+
television show      {{subst:div|article|tv}}
|<nowiki>{{div|sjff}}</nowiki>
 
|<nowiki>{{div|specjff}}</nowiki>
 
 
 
|-
 
|svpp
 
|Pocket Paradise species tab
 
|<nowiki>{{div|svpp}}</nowiki>
 
|<nowiki>{{div|specvpp}}</nowiki>
 
 
 
|-
 
|stv
 
|TV series species tab
 
|<nowiki>{{div|stv}}</nowiki>
 
|<nowiki>{{div|spectv}}</nowiki>
 
 
 
|-
 
|avp
 
|Classic article tab
 
|<nowiki>{{div|avp}}</nowiki>
 
|<nowiki>{{div|artclassic}}</nowiki>
 
 
 
|-
 
|avp2
 
|Trouble in Paradise article tab
 
|<nowiki>{{div|avp2}}</nowiki>
 
|<nowiki>{{div|artvp2}}</nowiki>
 
 
 
<!-- not sure if this is needed
 
|-
 
|ajff
 
|TIB: Just for Fun species tab
 
|<nowiki>{{div|sjff}}</nowiki>
 
|<nowiki>{{div|specjff}}</nowiki>
 
-->
 
|-
 
|avpp
 
|Pocket Paradise article tab
 
|<nowiki>{{div|avpp}}</nowiki>
 
|<nowiki>{{div|artvpp}}</nowiki>
 
 
 
|-
 
|atv
 
|TV series article tab
 
|<nowiki>{{div|atv}}</nowiki>
 
|<nowiki>{{div|arttv}}</nowiki>
 
 
 
|-
 
|req
 
|Requirements format - same for all platforms
 
|<nowiki>{{div|req}}</nowiki>
 
|<nowiki>{{div|require}}</nowiki>
 
  
|-
+
Species
|1
+
-------
|Used to close the requirements div
+
classic              {{subst:div|species|classic}}
|<nowiki>{{div|1}}</nowiki>
+
tip Standard        {{subst:div|species|tipStd}}
|<nowiki></div></nowiki>
+
tip Just for fun    {{subst:div|species|tipJff}}
 +
pocket paradise      {{subst:div|species|pp}}
 +
television show      {{subst:div|species|tv}}
  
|-
+
^^  The above tabs must be closed with {{subst:UX|-}} and each article ends with <headertabs/>
|2
+
^^  common content not within a page tab may appear below the headertabs closing
|Used to close a species div tab
 
|<nowiki>{{div|2}}</nowiki>
 
|<nowiki>{{div|close}}</nowiki>
 
  
|-
+
Basic article shell
|end
+
---start---          //eliminate any sections you don't need
|Used at end of article to close the tabs
 
|<nowiki>{{div|end}}</nowiki>
 
|<nowiki>{{div|headertabs}}</nowiki>
 
  
|}
 
 
==Usage==
 
The div template is used to create the tabbed browsing for the different games & platforms.
 
 
*Each platform section must be preceded by a =First level header= with the exact standard name followed by the div template with the appropriate paramater and closed at the bottom of the section before any navboxes
 
*Species and articles have different parameters
 
*Creating article pages with tabbed browsing uses the same format and =First level headings= as species articles do.
 
*Even if the article only applies to one platform, it should be tabbed to make it immediately apparent which platform the article covers
 
 
 
;Example of a species article using the div template
 
<pre>
 
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
  
 
=Classic=
 
=Classic=
{{div|svp}}           // this opens the tab section for a classic species
+
{{subst:div|article|classic}}
{{Species2Infobox
 
| title = Reddhott
 
 
...
 
...
}}
+
{{clear}}</div></div>
Imagine scorching the furniture when ...
 
  
== Classic requirements ==
+
=Trouble in Paradise=
Setting a [[Taffly]] on fire ...
+
{{subst:div|article|tip}}
 +
...
 +
{{clear}}</div></div>
  
{{div|req}}          // this formats the requirements properly
 
 
=== Romance requirements ===
 
*Has eaten 3 [[chili]]s
 
*...
 
{{div|1}}            // requirements div is closed with {{div|1}}
 
 
 
(rest of species headers i.e.
 
== Species variants ==
 
== Reddhott uses ==
 
== Species conflicts ==
 
== Other information ==
 
)
 
                      // {{clear}} is required to ensure the tab encloses any floating content
 
{{clear}}{{div|2}}    // {{div|close}}, {{div|2}} (or simply {{div}}) closes the species tab section
 
 
{{Species-Classic}}  // navboxes go below the close
 
  
 
=TiP - Standard=
 
=TiP - Standard=
{{div|svp2}}         // this opens the tab section for a Trouble in Paradise (standard) species
+
{{subst:div|article|tipStd}}
 +
...
 +
{{clear}}</div></div>
  
( ... same content as a classic species article ... )
 
 
{{clear}}{{div|2}}    // close tab section
 
 
{{Species-TroubleInParadise-Standard}}
 
  
 
=TiP - Just for Fun=
 
=TiP - Just for Fun=
{{div|sjff}}         // this opens the tab section for a Trouble in Paradise (Just for Fun) species
+
{{subst:div|article|tipJff}}
 
+
...
( ... same content as a classic species article ... )
+
{{clear}}</div></div>
  
{{clear}}{{div|2}}    // close tab section
 
 
{{Species-TroubleInParadise-JustForFun}}
 
  
 
=Pocket Paradise=
 
=Pocket Paradise=
{{div|svpp}}         // this opens the tab section for a Pocket Paradise species
+
{{subst:div|article|pp}}
 
+
...
( ... same content as a classic species article ... )
+
{{clear}}</div></div>
 
 
{{clear}}{{div|2}}    // close tab section
 
  
{{Template:Species-PocketParadise}}
 
  
 
=TV show=
 
=TV show=
{{div|stv}}         // this opens the tab section for a TV species
+
{{subst:div|article|tipStd}}
 
+
...
( ... content for a TV species article ... )
+
{{clear}}</div></div>
 
 
{{clear}}{{div|2}}    // close tab section
 
 
 
{{div|end}}          // close article tabs
 
 
 
  
[[Category:Flying]]  // categories, etc. go at the very bottom
+
<headertabs/>
 +
                    //never forget <headertabs/> - it closes the tabs
 +
===end===            //any content you put below it and it will show on any tab
  
</pre>                    
+
</pre></noinclude><includeonly><div class="pii_{{{1|article}}}_content_container"><div class="pii_{{{1|article}}}_{{{2|tip}}}_content"></includeonly>
</noinclude>
 

Latest revision as of 15:22, 23 August 2008

Usage

This template is used to create page tabs.

There are two parameters, the first being the type of page (article, species, or plant) and the second being the platform (and gametype, if applicable). It will default to a Trouble in Paradise article if no parameters are supplied.

This template should be subst:'ed.

Articles
--------
classic              {{subst:div|article|classic}}
trouble in paradise  {{subst:div|article|tip}}         //default - if no parameters are passed
    - Standard       {{subst:div|article|tipStd}}
    - Just for fun   {{subst:div|article|tipJff}}
pocket paradise      {{subst:div|article|pp}}
television show      {{subst:div|article|tv}}

Species
-------
classic              {{subst:div|species|classic}}
tip Standard         {{subst:div|species|tipStd}}
tip Just for fun     {{subst:div|species|tipJff}}
pocket paradise      {{subst:div|species|pp}}
television show      {{subst:div|species|tv}}

^^  The above tabs must be closed with {{subst:UX|-}} and each article ends with <headertabs/>
^^  common content not within a page tab may appear below the headertabs closing

Basic article shell
---start---          //eliminate any sections you don't need

__NOTOC__
__NOEDITSECTION__

=Classic=
{{subst:div|article|classic}}
...
{{clear}}</div></div>

=Trouble in Paradise=
{{subst:div|article|tip}}
...
{{clear}}</div></div>


=TiP - Standard=
{{subst:div|article|tipStd}}
...
{{clear}}</div></div>


=TiP - Just for Fun=
{{subst:div|article|tipJff}}
...
{{clear}}</div></div>


=Pocket Paradise=
{{subst:div|article|pp}}
...
{{clear}}</div></div>


=TV show=
{{subst:div|article|tipStd}}
...
{{clear}}</div></div>

<headertabs/>
                     //never forget <headertabs/> - it closes the tabs
===end===            //any content you put below it and it will show on any tab