Difference between revisions of "Template:Component/doc"
Jump to navigation
Jump to search
imported>Petr Matas (→Usage) |
imported>Vanisaac m (→Examples: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
Line 13: | Line 13: | ||
|2= {{((}}Component {{!}} {{((}}Item{{!}}Alice{{!}}Bob{{!}}best=Eve{{))}} {{!}} best{{))}} | |2= {{((}}Component {{!}} {{((}}Item{{!}}Alice{{!}}Bob{{!}}best=Eve{{))}} {{!}} best{{))}} | ||
}} | }} | ||
− | <includeonly>{{ | + | <includeonly>{{Sandbox other|| |
[[Category:Wikipedia formatting and function templates]] | [[Category:Wikipedia formatting and function templates]] | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 15:49, 24 April 2020
![]() | 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.
Examples
Markup | Renders as |
---|---|
{{Component | {{Item|Alice|Bob|best=Eve}} | 1}} |
Alice |
{{Component | {{Item|Alice|Bob|best=Eve}} | best}} |
Eve |