Jump to content

Template:TabbedWindowBegin: Difference between revisions

From mediawiki.org
Content deleted Content added
m Hide.
Use category for template gadgets
 
Line 1: Line 1:
<includeonly><div class="mw-gadget-tabbedwindow"></includeonly><noinclude>
<includeonly>[[Category:TabbedWindow.js]]<div class="mw-gadget-tabbedwindow"></includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 22:36, 16 July 2024

Template documentation

This template is used, together with {{TabbedWindowEnd }}, to create the a tabbed window interface in documentation, e.g. for code snippets in multiple programming languages. The tabs will be created from the level 3 headings between the start/end templates.

The template relies on Gadget-tabbedwindow.js. It can be used in the API, Help, Manual and the main namespace.

Example

[edit]
{{TabbedWindowBegin}}
=== Python ===
<syntaxhighlight lang="Python" line='line'>
print("Hello World!")
</syntaxhighlight>

=== JavaScript ===
<syntaxhighlight lang="javascript" line='line'>
console.log("Hello World!");
</syntaxhighlight>
{{TabbedWindowEnd}}

Python

[edit]
print("Hello World!")

JavaScript

[edit]
console.log("Hello World!");