Template:Sandbox: Difference between revisions

From Crazy-Fools.co.uk Wiki
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Extension |templatemode =
<noinclude>
|name                =
<!--
|status              =
Text starting with lt!-- and ending with --gt is a comment that will be not show.
|type1                =
Text between the noinclude tags is the documentation for your template and will not be transcluded with your template.
|type2                =
-->
|hook1                =
 
|hook2                =
Look at this in source or edit view to really see how it is set up.
|newhook1            =
 
|newhook2            =
This template just demonstrates a really simple infobox that will show up at the right top of where the template is used. It is really just a [https://www.mediawiki.org/wiki/Help:Templates mediawiki template] that generates a right floating [https://www.mediawiki.org/wiki/Help:Tables mediawiki table].
|username            =
 
|author              =
==Template Use==
|description          =
To use this template, put the following text on a page, replacing the values as instructed.
|image                =
 
|imagesize            =
<pre>
|version              =
{{SampleInfobox
|update              =
| firstValue = replace this with first value
|version preview      =
| secondValue = replace this with second value
|update preview      =
|compatibility policy =
|mediawiki           =
|php                  =
|needs-updatephp      =  
|composer            =
|table1              =  
|table2              =  
|license              =
|download            =
|repo                =
|readme              =
|changelog            =  
|help                =
|example              =
|namespace            =
|parameters          =
|tags                =
|rights              =
|compatibility        =
|phabricator          =
|translate            =
|vagrant-role        =  
}}
}}
</pre>
<!--
this draws a line to show where the template description ends and the template itself starts. The template would work without it.
-->
<templatedata>
{
"description": "A simple template that requires two values, first value and second value",
"params": {
"firstValue": {
"label": "The First Value",
"type": "string",
"required": true
},
"secondValue": {
"label": "Second Value",
"type": "string",
"required": true
}
},
"paramOrder": [
"firstValue",
"secondValue"
]
}
</templatedata>
</noinclude>
{| class="wikitable" border="1" style="float:right; width:33%" <!-- float puts it on right side and wraps text -->
|style="text-align: center" <!-- center the text --> colspan="2" <!--  make title row span across columns --> | A Sample Infobox
|-
| style="background:silver; color:arsenic; width:25%" align="right"| '''First Value: '''
| {{{firstValue}}}
|-
| style="background:silver; color:arsenic" align="right"| '''Second Value: '''
| {{{secondValue}}}
|}

Latest revision as of 20:22, 31 May 2024


Look at this in source or edit view to really see how it is set up.

This template just demonstrates a really simple infobox that will show up at the right top of where the template is used. It is really just a mediawiki template that generates a right floating mediawiki table.

Template Use

To use this template, put the following text on a page, replacing the values as instructed.

{{SampleInfobox
| firstValue = replace this with first value
| secondValue = replace this with second value
}}


A simple template that requires two values, first value and second value

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
The First ValuefirstValue

no description

Stringrequired
Second ValuesecondValue

no description

Stringrequired


A Sample Infobox
First Value: {{{firstValue}}}
Second Value: {{{secondValue}}}