Difference between revisions of "Template:LoadPage"

From wiki.vg
Jump to navigation Jump to search
(Copy template from Minecraft Wiki)
 
(Maybe it's "mw-load-page" here?)
 
Line 1: Line 1:
<includeonly><div class="load-page" data-page="{{{1}}}" {{#if: {{{transcluded|}}} | data-template="true" }}>
+
<includeonly><div class="mw-load-page" data-page="{{{1}}}" {{#if: {{{transcluded|}}} | data-template="true" }}>
 
<{{{3|h2}}}>{{#if: {{{2|}}} | {{{2}}} | {{{1}}} }}</{{{3|h2}}}>
 
<{{{3|h2}}}>{{#if: {{{2|}}} | {{{2}}} | {{{1}}} }}</{{{3|h2}}}>
<div class="load-page-content noscript">{{main|{{{1}}}}}<span class="mw-editsection-like" title="Edit: {{{1}}}">[<nowiki/>[{{fullurl: {{{1}}} | action=edit }} edit]<nowiki/>]</span></div>
+
<div class="mw-load-page-content noscript">{{main|{{{1}}}}}<span class="mw-editsection-like" title="Edit: {{{1}}}">[<nowiki/>[{{fullurl: {{{1}}} | action=edit }} edit]<nowiki/>]</span></div>
 
</div></includeonly><noinclude>The LoadPage template creates a placeholder for unloaded content, and a link to load the content. Use the LoadPage template to split articles into multiple pieces to be loaded into a primary article as needed.
 
</div></includeonly><noinclude>The LoadPage template creates a placeholder for unloaded content, and a link to load the content. Use the LoadPage template to split articles into multiple pieces to be loaded into a primary article as needed.
  

Latest revision as of 19:33, 7 March 2016

The LoadPage template creates a placeholder for unloaded content, and a link to load the content. Use the LoadPage template to split articles into multiple pieces to be loaded into a primary article as needed.

Usage

{{LoadPage|<page>|<title>|<element>}}

The <page> parameter specifies the page title (including namespace) of the content to be loaded when requested (for example, Namespace:Article/subpage).

The optional <title> parameter specifies the text to be displayed as placeholder (if omitted or empty, defaults to <page>).

The optional <element> parameter specifies the HTML element name to be applied to the placeholder text (if omitted, defaults to h2).

The optional {{{transcluded}}} parameter specifies that the page is already transcluded, and should be shown directly (minus self-links). This is intended for performance, as the transclusion is cached, however features like <noinclude> on the page won't work, and features like {{PAGENAME}} will use the original page's name, rather than the current pages name. Only self-links are manually resolved (however existing self-links will also remain).