Template:Item: Difference between revisions

3,225 bytes added ,  18 days ago
Language tag for NameJP
No edit summary
(Language tag for NameJP)
 
(34 intermediate revisions by 2 users not shown)
Line 1:
<noinclude>
<templatestyles src="Item/item.css" />
{{#cargo_declare:
<includeonly><table class="wikitable itemtable">
_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">
<td colspan="4">[[File:{{{Icon|}}}|center|{{{NameEN|}}}]]{{#if: {{{NameEN|}}} | <span class="item-name-main">{{{NameEN|}}}</span> }}{{#if: {{{NameJP|}}} | <span class="item-name-sub">{{{NameJP|}}}</span> }}
{{#if: {{{SplashIcon|}}}
<div class="item-description"><tabber>
| [[File:{{{SplashIcon|}}}|center|{{{NameEN|}}}|class=splashicon]]{{#if: {{{NameEN|}}} | <span class="item-name-main">{{{NameEN|}}}</span> }}{{#if: {{{NameJP|}}} | <span class="item-name-sub" lang="ja">{{{NameJP|}}}</span> }}
English={{{DescriptionEN|}}}
| [[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>
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: {{{AltName|}}} | <tr>
<th>TagsAlternative name</tdth>
<td colspan="3">{{#forargs: Tag{AltName|}}}</td>
</tr>
}}{{#if: {{{Collection|}}} | <tr>
<th>Collection</th>
<td colspan="3">{{{Collection|}}}</td>
</tr>
}}{{#if: {{{Tag1|}}} | <tr>
<th>Tags</th>
<td colspan="3">{{#sub:{{#forargs: Tag
| key
| value
| {{#var: value }},&#32;
}}|0|-6}}</td>
</tr>
}}{{#if: {{{Favorite1|}}} | <tr><th>Favorite gift</tdth><td colspan="3" class="itemtablerelated-favoritecharacters">{{#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</th><td colspan="3" class="related-characters">{{#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</th><td colspan="3" class="related-characters">{{#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</th><td colspan="3" class="related-characters">
{{#dpl:
| namespace =
| category = Characters
| linksto = {{PAGENAMEE}}
| includesubpages = true
| mode = userformat
| format = ,,,
| include = {Character{{!}}RelatedCharacter.dpl}
| ordermethod = title
}}
</td></tr> }}{{#if: {{{Tier|}}} | <tr>
<th>Tier</th>
<td colspan="3">{{{Tier|}}}</td>
</tr>
}}{{#if: {{{RecipeCost|{{{RecipePart|}}} }}} | <tr>
<th>Recipe</th>
<td colspan="3">
{{#forargs: RecipePart
| key
| value
| [[File:{{#var: value }}.pngItemCard|frameless|48px|alt={{#var: value }}|linkquantity={{{RecipeCount{{#var: valuekey }}|class=related-portrait]]&nbsp;[[{{#var: value}}} }}]]&#32;
}}</td></tr> }}
 
<nowiki />
}}
 
{{ItemCard|Credits|quantity={{{RecipeCost|}}} }}
</table>{{#ifeq:{{NAMESPACE}}||{{#if: {{{Category|}}} | [[Category:{{{Category|}}}]]}} }}{{#ifexist: Image:{{{Icon|{{PAGENAMEE}}.png}}} | {{#seo: |image = {{{Icon|{{PAGENAMEE}}.png}}} |image_alt = {{{NameEN|}}} }} | }}{{#seo:
</td>
|title={{{NameEN|}}}
</tr>
|title_mode=append
}}{{#switch: {{{Category|}}}
|keywords={{{NameEN|}}},item,crafting,gift
| Hat
|description={{{NameEN|}}} is a {{{Rarity|}}}-star {{{Category|}}} item. {{{DescriptionEN|}}}
| Gloves
| Shoes
| Bag
| Badge
| Hairpin
| Charm
| Watch
| Necklace = <tr>
<th>Mission drops</th><!-- if tier is 1 OR page name contains blueprint, then use DPL query;
otherwise, this item is not directly farmable and the user should go to the blueprint page
-->{{#if:{{#ifeq:{{{Tier|}}}|1|YES|}}{{#ifeq:{{#count:{{PAGENAME}}|Blueprint}}|1|YES|}}|
<td colspan="3">
{{#dpl:
| category = Missions
| linksto = {{PAGENAME}}
| ordermethod = sortkey
| mode = userformat
| format = ,<div>,</div>,
| include = {MissionRewards{{!}}ItemMissionReward.dpl}
}}
</td>
| <td colspan="3">Not directly farmable. See [[{{PAGENAME}} Blueprint|{{SUBPAGENAME}} Blueprint]].</td>
}}
</tr>
}}
</table>{{#ifeq:{{NAMESPACE}}||[[Category:Items]]{{#if: {{{Category|}}} | [[Category:{{{Category|}}}]]}}{{#if: {{{Collection|}}} | [[Category:{{{Collection|}}}]]}} }}{{#seo:
|title={{{NameEN|}}}
|title_mode=append
|keywords={{{NameEN|}}}{{#if: {{{AltName|}}}|,{{{AltName|}}}}},item,crafting,gift
|description={{{NameEN|}}} is a {{{Rarity|}}}-star {{lc: {{{Category|}}} }} item. {{{DescriptionEN|}}}
|image = {{{Icon|{{PAGENAMEE}}.png}}}
}}</includeonly>
<noinclude>
General item template for materials (BD, book, oopart), collectibles etc.
Todo:
*reinstate <nowiki>[[Category:Items]]</nowiki>
</noinclude>