Template:Sidebar/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 7: Line 7:
== Copy and Paste ==
== Copy and Paste ==
{{CodeBlock|<nowiki>{{Sidebar
{{CodeBlock|<nowiki>{{Sidebar
| image       =  
| image       =  
| title       =  
| title       =  
| header     =  
| header1     =  
| content     =  
| content2     =  
| footer     =  
| footer       =  
}}</nowiki>}}
}}</nowiki>}}


== Usage & Preview ==
== Usage & Preview ==
{{Sidebar
{{Sidebar
| image       = Software Cover - The Lab
| image       = Software Cover - The Lab
| width      = 300px
| title       = {{param|title}}
| title       = {{param|title}}
| header1     = {{param|header}}
| header     = {{param|header}}
| content1     = {{param|content}}
| content     = {{param|content}}
| footer       = {{param|footer}}
| footer     = {{param|footer}}
}}
}}
{{CodeBlock|<nowiki>{{Sidebar}}</nowiki>}}
{{CodeBlock|<nowiki>{{Sidebar}}</nowiki>}}
Line 34: Line 33:
| {{CodeBlock|margin=5px|<nowiki>| title = Lorem ipsum </nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| title = Lorem ipsum </nowiki>}}
|-
|-
| {{param|header}}
| {{param|header <1-2>}}
| Header content
| Header content
| {{CodeBlock|margin=5px|<nowiki>| header = Foo bar </nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| header = Foo bar </nowiki>}}
|-
|-
| {{param|content}}
| {{param|content <1-2>}}
| Main content
| Main content
| {{CodeBlock|margin=5px|<nowiki>| content = Example </nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| content = Example </nowiki>}}

Revision as of 03:50, 29 May 2023

Edit-copy.png
This is a documentation subpage for Template:Sidebar.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This is a metatemplate used to aid in the creation of sidebar templates.

Testcases

Testcases for this template can be located on the testcases subpage.

Copy and Paste

{{Sidebar | image = | title = | header1 = | content2 = | footer = }}

Usage & Preview

{{{content}}}
{{{footer}}}
{{Sidebar}}
Parameter Description Example
{{{title}}} Sidebar title
| title = Lorem ipsum
{{{header <1-2>}}} Header content
| header = Foo bar
{{{content <1-2>}}} Main content
| content = Example
{{{footer}}} Footer content
| footer = Placeholder
{{{width}}} Width of the sidebar container and sidebar image
| width = 320px
Image parameters
{{{image}}} Sidebar image
| image = Software Cover - The Lab
{{{imageformat}}} File extension for the sidebar image
| imageformat = jpg
{{{imagewidth}}} Sidebar image width
| imagewidth = 64px
Style parameters
{{{float}}} For specifying how or if the sidebar will float
| float = left