Template:Item: Difference between revisions

1,014 bytes added ,  1 year ago
Show relevant Missions for item blueprints
(fix new tabber behaviour)
(Show relevant Missions for item blueprints)
Line 1:
<noinclude>
{{#cargo_declare:
_table = items
|Id = Integer
|Rarity = Integer
|Category = String
|NameJP = String
|NameEN = String
|DescriptionJP = String (size=400)
|DescriptionEN = String (size=400)
|Collection = String
|Icon = File
}}
</noinclude>
<templatestyles src="Item/item.css" />
<includeonly>{{#cargo_store:_table=items}}<table class="wikitable itemtable">
<tr class="itemtable-summary">
<td colspan="4">
{{#if: {{{SplashIcon|}}}
| [[File:{{{SplashIcon|}}}|center|{{{NameEN|}}}|class=splashicon]]{{#if: {{{NameEN|}}} | <span class="item-name-main">{{{NameEN|}}}</span> }}{{#if: {{{NameJP|}}} | <span class="item-name-sub">{{{NameJP|}}}</span> }}
| [[File:{{{Icon|}}}|center|{{{NameEN|}}}]]{{#if: {{{NameEN|}}} | <span class="item-name-main">{{{NameEN|}}}</span> }}{{#if: {{{NameJP|}}} | <span class="item-name-sub">{{{NameJP|}}}</span> }}
}}<div class="item-description"><tabber>English={{{DescriptionEN|}}}
|-|
Japanese={{{DescriptionJP|}}}</tabber></div>
</td>
</tr>
<tr class="data-row">
<th>Rank</th>
<td class="rarity" data-value="{{{Rarity|0}}}">{{Rarity|{{{Rarity|}}}}}</td>
<th>Category</th>
<td>{{{Category|}}}</td>
</tr>
{{#if: {{{Collection|}}} | <tr>
<th>Collection</td>
<td colspan="3">{{{Collection|}}}</td>
</tr>
}}{{#if: {{{Tag1|}}} | <tr>
<th>Tags</td>
<td colspan="3">{{#sub:{{#forargs: Tag
| key
| value
| {{#var: value }},&#32;
}}|0|-6}}</td>
</tr>
}}{{#if: {{{Favorite1|}}} | <tr><th>Favorite gift</td><td colspan="3" class="itemtable-related">{{#forargs: Favorite
| key
| value
| {{#ifexist: {{#var: value }} | <div>[[File:{{#var: value }}.png|frameless|48px|alt={{#var: value }}|link={{#var: value }}|class=related-portrait]]&nbsp;[[{{#var: value }}]]</div>
}} }}</td></tr> }}{{#if: {{{Likes1|}}} | <tr><th>Likes gift</td><td colspan="3" class="itemtable-related">{{#forargs: Likes
| key
| value
| {{#ifexist: {{#var: value }} | <div>[[File:{{#var: value }}.png|frameless|48px|alt={{#var: value }}|link={{#var: value }}|class=related-portrait]]&nbsp;[[{{#var: value }}]]</div>
}} }}</td></tr> }}{{#if: {{{Character|}}} | <tr><th>Received from</td><td colspan="3" class="itemtable-related">{{#ifexist: {{{Character|}}} | <div>[[File:{{{Character|}}}.png|frameless|48px|alt={{{Character|}}}|link={{{Character|}}}|class=related-portrait]]&nbsp;[[{{{Character|}}}]]</div> | <div>[[File:{{{Character|}}}.png|frameless|48px|alt={{{Character|}}}|link=|class=related-portrait]]&nbsp;{{{Character|}}}</div>
}} </td></tr> }}{{#ifeq: {{{Category|}}} | Material | <tr><th>Used by</td><td colspan="3" class="itemtable-related">
{{#dpl:
| namespace =
| category = Characters
| linksto = {{PAGENAMEE}}
| includesubpages = true
| mode = userformat
| format = ,<div>,</div>,
| include = {Character{{!}}RelatedCharacter.dpl}
| ordermethod = title
}}
</td></tr> }}{{#if: {{{Tier|}}} | <tr>
<th>Tier</td>
<td colspan="3">{{{Tier|}}}</td>
</tr>
}}{{#if: {{{RecipeCost|{{{RecipePart|}}} }}} | <tr>
<th>Recipe</td>
<td colspan="3">
{{#forargs: RecipePart
| key
| value
| {{ItemCard|{{#var: value }}|quantity={{{RecipeCount{{#var: key }}|}}} }}
<nowiki />
}}
{{ItemCard|Credits|quantity={{{RecipeCost|}}} }}
</td>
</tr>
}}{{#ifeq: {{{Category|}}} | Shoes | <tr>
<tr class="data-row">
<th>RankMission drops</thtd>
<td colspan="3">
<td class="rarity" data-value="{{{Rarity|0}}}">{{Rarity|{{{Rarity|}}}}}</td>
<th> {{#switch: {{{Category</th>|}}}
<td>{{{Category |}}}</td> Hat
| Gloves
</tr>
| Shoes
{{#if: {{{Collection|}}} | <tr>
<th>Collection</td> | Bag
<td colspan="3">{{{Collection |}}}</td> Badge
| Hairpin
</tr>
| Charm
}}{{#if: {{{Tag1|}}} | <tr>
<th>Tags</td> | Watch
<td colspan | Necklace ="3"> {{#subdpl:{{#forargs: Tag
| keycategory = Missions
| valuelinksto = {{PAGENAME}}
| {{#var:mode value= }},&#32;unordered
| ordermethod = firstedit
}}|0|-6}}</td>
}}
}}
</td>
</tr>
}}
}}{{#if: {{{Favorite1|}}} | <tr><th>Favorite gift</td><td colspan="3" class="itemtable-related">{{#forargs: Favorite
</table>{{#ifeq:{{NAMESPACE}}||[[Category:Items]]{{#if: {{{Category|}}} | [[Category:{{{Category|}}}]]}} }}{{#ifexist: Image:{{{Icon|{{PAGENAMEE}}.png}}} | {{#seo: |image = {{{Icon|{{PAGENAMEE}}.png}}} |image_alt = {{{NameEN|}}} }} | }}{{#seo:
| key
|title={{{NameEN|}}}
| value
|title_mode=append
| {{#ifexist: {{#var: value }} | <div>[[File:{{#var: value }}.png|frameless|48px|alt={{#var: value }}|link={{#var: value }}|class=related-portrait]]&nbsp;[[{{#var: value }}]]</div>
|keywords={{{NameEN|}}},item,crafting,gift
}} }}</td></tr> }}{{#if: {{{Likes1|}}} | <tr><th>Likes gift</td><td colspan="3" class="itemtable-related">{{#forargs: Likes
|description={{{NameEN|}}} is a {{{Rarity|}}}-star {{lc: {{{Category|}}} }} item. {{{DescriptionEN|}}}
| key
}}</includeonly>
| value
<noinclude>
| {{#ifexist: {{#var: value }} | <div>[[File:{{#var: value }}.png|frameless|48px|alt={{#var: value }}|link={{#var: value }}|class=related-portrait]]&nbsp;[[{{#var: value }}]]</div>
General item template for materials (BD, book, oopart), collectibles etc.
}} }}</td></tr> }}{{#if: {{{Character|}}} | <tr><th>Received from</td><td colspan="3" class="itemtable-related">{{#ifexist: {{{Character|}}} | <div>[[File:{{{Character|}}}.png|frameless|48px|alt={{{Character|}}}|link={{{Character|}}}|class=related-portrait]]&nbsp;[[{{{Character|}}}]]</div> | <div>[[File:{{{Character|}}}.png|frameless|48px|alt={{{Character|}}}|link=|class=related-portrait]]&nbsp;{{{Character|}}}</div>
</noinclude>
}} </td></tr> }}{{#ifeq: {{{Category|}}} | Material | <tr><th>Used by</td><td colspan="3" class="itemtable-related">
{{#dpl:
| namespace =
| category = Characters
| linksto = {{PAGENAMEE}}
| includesubpages = true
| mode = userformat
| format = ,<div>,</div>,
| include = {Character{{!}}RelatedCharacter.dpl}
| ordermethod = title
}}
</td></tr> }}{{#if: {{{Tier|}}} | <tr>
<th>Tier</td>
<td colspan="3">{{{Tier|}}}</td>
</tr>
}}{{#if: {{{RecipeCost|{{{RecipePart|}}} }}} | <tr>
<th>Recipe</td>
<td colspan="3">
{{#forargs: RecipePart
| key
| value
| {{ItemCard|{{#var: value }}|quantity={{{RecipeCount{{#var: key }}|}}} }}
 
<nowiki />
}}
 
{{ItemCard|Credits|quantity={{{RecipeCost|}}} }}
</td>
</tr>
}}
</table>{{#ifeq:{{NAMESPACE}}||[[Category:Items]]{{#if: {{{Category|}}} | [[Category:{{{Category|}}}]]}} }}{{#ifexist: Image:{{{Icon|{{PAGENAMEE}}.png}}} | {{#seo: |image = {{{Icon|{{PAGENAMEE}}.png}}} |image_alt = {{{NameEN|}}} }} | }}{{#seo:
|title={{{NameEN|}}}
|title_mode=append
|keywords={{{NameEN|}}},item,crafting,gift
|description={{{NameEN|}}} is a {{{Rarity|}}}-star {{lc: {{{Category|}}} }} item. {{{DescriptionEN|}}}
}}</includeonly>
<noinclude>
General item template for materials (BD, book, oopart), collectibles etc.
</noinclude>