Difference between revisions of "Template:Component/doc"
Jump to navigation
Jump to search
imported>Petr Matas |
imported>Petr Matas (→Usage) |
||
| Line 6: | Line 6: | ||
{{((}}Component|''[[Template:Item|Item]]''|''ParameterName''}} | {{((}}Component|''[[Template:Item|Item]]''|''ParameterName''}} | ||
| − | + | ''Note:'' If you need to extract multiple components of a large item, consider using {{tl|Format item}} instead of multiple calls to {{tl|Component}}, because each call to {{tl|Component}} requires unpacking of the entire item, which may be costly. | |
| + | |||
{| class=wikitable | {| class=wikitable | ||
| + | |+ Examples | ||
! Code !! Result | ! Code !! Result | ||
|- | |- | ||
Revision as of 03:26, 14 December 2015
| This is a documentation subpage for Template:Component. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
This template extracts a given component from a given item.
Usage
{{Component|Item|ParameterName}}
Note: If you need to extract multiple components of a large item, consider using {{Format item}} instead of multiple calls to {{Component}}, because each call to {{Component}} requires unpacking of the entire item, which may be costly.
| Code | Result |
|---|---|
{{Component | {{Item|Alice|Bob|best=Eve}} | 1}}
|
Alice |
{{Component | {{Item|Alice|Bob|best=Eve}} | best}}
|
Eve |