Modifications

Sauter à la navigation Sauter à la recherche

Modèle:LoadBox/doc

3 263 octets ajoutés, 14 novembre 2018 à 06:39
Replace pt-br with pt
{{Documentation header}}
{{LoadBox
|page=Template:LoadBox/example
|title=LoadBox Example
}}
This template creates a box able to load content from another page.

{{-}}
== Usage ==

<nowiki>{{LoadBox
|page=<page>
|title=<title>
|float=<float>
|class=<class>
|style=<style>
|titlestyle=<titlestyle>
|contentstyle=<contentstyle>
}}</nowiki>

;page
: Specifies the wiki link text of the content to be loaded (e.g., <code>page=Namespace:Article/subpage</code>).

;title
: Specifies the identifying text to be displayed in the box, and its link target string (e.g., <code>title=Loaded Content Title</code>). Leaving ''title'' unspecified will generate an error message and should be corrected.

;float
: Optional. Specifies how the box should be positioned. The only two valid values are <code>left</code>, which creates a left-floated box, and <code>none</code>, which creates an un-floated box spanning the available width. If ''float'' is not specified, or an invalid value provided, LoadBox creates a right-floated box. Can also be overridden with the style parameter (below).

;class
: Optional. Specifies one or more css classes to add to the outer box.

;style
: Optional. Specifies additional styling code for the entire box. Its value should be a [[wikipedia:css|css]] declaration or declaration group with no surrounding braces or quotes (e.g., <code>style=background-color: yellow;</code>).

;titlestyle
: Optional. Specifies additional styling code for the title. Its value should be a [[wikipedia:css|css]] declaration or declaration group with no surrounding braces or quotes (e.g., <code>titlestyle=background-color: yellow;</code>).

;contentstyle
: Optional. Specifies additional styling code for the loaded content. Its value should be a [[wikipedia:css|css]] declaration or declaration group with no surrounding braces or quotes (e.g., <code>contentstyle=background-color: yellow;</code>).

=== Considerations ===

The generated box will change its size when its content is loaded by the reader. Consider using {{tl|-}} to ensure that the box doesn't overlap or push aside other content on the page inappropriately (for example, the Usage heading above has a {{tl|-}} before it so that the example won't overlap it when its content is loaded). Don't necessarily put {{tl|-}} directly after LoadBox -- it may be better to put it below the content the LoadBox accompanies.

=== Alternatives ===

The '''preferred method''' for initially hiding content that won't significantly impact server load times is a table with <code>class="collapsible"</code>, because it keeps all of an article's content in one place.

LoadBox is intended for ''small'' article fragments which could impact server load times if placed in the article directly. For ''large'' article fragments, which could actually constitute article sections, consider {{tl|LoadPage}}.

<includeonly>

[[nl:Sjabloon:LoadBox]]
[[pl:Szablon:LoadBox]]
[[pt:Predefinição:LoadBox]]
[[ru:Шаблон:ЗагрузкаБлок]]
[[uk:Шаблон:LoadBox]]
[[Category:Templates|L]]
</includeonly>
<noinclude>
[[nl:Sjabloon:LoadBox/doc]]
[[pl:Szablon:LoadBox/opis]]
[[pt:Predefinição:LoadBox/doc]]
[[ru:Шаблон:ЗагрузкаБлок/док]]
[[uk:Шаблон:LoadBox/док]]
</noinclude>
Utilisateur anonyme

Menu de navigation