Main Page

Difference between revisions of "Template:NGSItem"

From Arks-Visiphone
Jump to navigation Jump to search
m (correct template)
(Correct space)
Line 1: Line 1:
<onlyinclude><span style="white-space: nowrap">{{ #if: {{{Icon|}}} | {{Icons|{{{Icon}}}}} }} {{ #if: {{{PageName|}}} | [[{{{PageName}}}{{ #if: {{{RealName|}}}|{{!}}{{{RealName}}}}}]] | {{{RealName}}} }} {{ #if: {{{Amount|}}} | ×{{{Amount}}} }}</span></onlyinclude>
+
<onlyinclude><span style="white-space: nowrap">{{ #if: {{{Icon|}}} | {{Icons|{{{Icon}}}}} }} {{ #if: {{{PageName|}}} | [[{{{PageName}}}{{ #if: {{{RealName|}}}|{{!}}{{{RealName}}}}}]] | {{{RealName}}}}}{{ #if: {{{Amount|}}}| &nbsp;×{{{Amount}}}}}</span></onlyinclude>
 
<noinclude>
 
<noinclude>
 
{{Documentation|content=
 
{{Documentation|content=
Line 9: Line 9:
 
results in this:
 
results in this:
  
{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}
+
{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}.
  
 
but if you don't include a PageName, it won't be linked:
 
but if you don't include a PageName, it won't be linked:
  
{{NGSItem|Icon=NGS Sword|RealName=Prim Sword}}
+
{{NGSItem|Icon=NGS Sword|RealName=Prim Sword}}.
  
 
You can also specify the amount of the item, which is great for items like Materials that you get multiple of for example, like N-Grinders.
 
You can also specify the amount of the item, which is great for items like Materials that you get multiple of for example, like N-Grinders.
Line 20: Line 20:
 
Results in this:
 
Results in this:
  
{{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}}
+
{{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}}.
  
 
}}
 
}}

Revision as of 22:29, 7 December 2021

{{{RealName}}}

Template documentation

This template is intended to be used on NGS pages to list the names of items, while showing a UI icon and preventing a line break mid-name.

Example

Writing the following:

{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}

results in this:

Sword (NGS) Prim Sword.

but if you don't include a PageName, it won't be linked:

Sword (NGS) Prim Sword.

You can also specify the amount of the item, which is great for items like Materials that you get multiple of for example, like N-Grinders.

{{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}}

Results in this:

Tool (NGS) N-Grinder ×50.

Syntax error in JSON.