Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Gallery Section (Cargo): Difference between revisions

Template page
m (Have see more and see cameos use the same method of sorting as the gallery section itself)
m (add "count all" field)
Line 11: Line 11:
   |{{{title|}}}
   |{{{title|}}}
}}}}}}<!--
}}}}}}<!--
-->{{#vardefine:count all|{{#if:{{{count all|}}}|&nbsp;{{{count all|}}}}}}}<!--
-->{{#vardefine:CHARACTER|{{#replace:{{{character|}}}|'|}}}}<!--
-->{{#vardefine:CHARACTER|{{#replace:{{{character|}}}|'|}}}}<!--
-->{{#vardefine:see all|<a target="_blank" href="{{#invoke:ViewData URL|Files|character={{#var:CHARACTER}}|location={{{location|}}}|weapon={{{weapon|}}}|artist={{{artist|}}}|section={{{section|}}}|source={{{source|}}}|order="{{{sort|}}}"|intro={{#var:header}}}}"><div class="bb character-grid center" style="margin-left:10px; display:inline-block; width:65px;"><div>see all</div></div></a>}}<!--
 
-->{{#vardefine:see all|<a target="_blank" href="{{#invoke:ViewData URL|Files|character={{#var:CHARACTER}}|location={{{location|}}}|weapon={{{weapon|}}}|artist={{{artist|}}}|section={{{section|}}}|source={{{source|}}}|order="{{{sort|}}}"|intro={{#var:header}}}}"><div class="bb character-grid center" style="margin-left:10px; display:inline-block; width:65px;"><div>see all{{#var:count all}}</div></div></a>}}<!--
 
-->{{#vardefine:see cameo|<a target="_blank" href="{{#invoke:ViewData URL|Files|cameo={{#var:CHARACTER}}|location={{{location|}}}|weapon={{{weapon|}}}|artist={{{artist|}}}|section={{{section|}}}|source={{{source|}}}|order="{{{sort|}}}"|intro={{#var:header}}}}"><div class="bbdw character-grid center" style="margin-left:10px; display:inline-block; width:100px;"><div>see cameos</div></div></a>}}<!--
-->{{#vardefine:see cameo|<a target="_blank" href="{{#invoke:ViewData URL|Files|cameo={{#var:CHARACTER}}|location={{{location|}}}|weapon={{{weapon|}}}|artist={{{artist|}}}|section={{{section|}}}|source={{{source|}}}|order="{{{sort|}}}"|intro={{#var:header}}}}"><div class="bbdw character-grid center" style="margin-left:10px; display:inline-block; width:100px;"><div>see cameos</div></div></a>}}<!--
-->{{#vardefine:see cameo default|[{{#invoke:ViewData URL|Files|cameo={{#var:CHARACTER}}|location={{{location|}}}|weapon={{{weapon|}}}|artist={{{artist|}}}|section={{{section|}}}|source={{{source|}}}|order="{{{sort|}}}"|intro={{#var:header}}}} <div class="bbdw character-grid center" style="margin-left:10px; display:inline-block; width:100px;"><div>see cameos</div></div>]}}<!--
-->{{#vardefine:see cameo default|[{{#invoke:ViewData URL|Files|cameo={{#var:CHARACTER}}|location={{{location|}}}|weapon={{{weapon|}}}|artist={{{artist|}}}|section={{{section|}}}|source={{{source|}}}|order="{{{sort|}}}"|intro={{#var:header}}}} <div class="bbdw character-grid center" style="margin-left:10px; display:inline-block; width:100px;"><div>see cameos</div></div>]}}<!--
-->{{#vardefine:intro|<div>{{#var:header}}{{#ifeq:{{{see all|}}}|n||{{#var:see all}}}}{{#ifeq:{{{see cameo|}}}|y|{{#var:see cameo}}}}</div>}}<!--
-->{{#vardefine:intro|<div>{{#var:header}}{{#ifeq:{{{see all|}}}|n||{{#var:see all}}}}{{#ifeq:{{{see cameo|}}}|y|{{#var:see cameo}}}}</div>}}<!--
-->{{#vardefine:default|{{#if:{{#var: {{{section|}}} }}|<div>{{#var:header}}{{#var:see cameo default}}</div>}}}}<!--
-->{{#vardefine:default|{{#if:{{#var: {{{section|}}} }}|<div>{{#var:header}}{{#var:see cameo default}}</div>}}}}<!--
-->{{#cargo_query:
-->{{#cargo_query:
Line 53: Line 59:
|see all=
|see all=
|see cameos=
|see cameos=
|count all=
}}
}}
</nowiki></pre>
</nowiki></pre>
Line 71: Line 78:


<code>|see cameos=</code> Optional. Change to <code>y</code> to show a button to Special:ViewData that performs the same query, but with the character as a cameo instead. (e.g. Izayoi showing up in Hakumen's Arcade Mode)
<code>|see cameos=</code> Optional. Change to <code>y</code> to show a button to Special:ViewData that performs the same query, but with the character as a cameo instead. (e.g. Izayoi showing up in Hakumen's Arcade Mode)
<code>|count all=</code> Optional. Put a number here to display it next to the "see all" message (e.g. "see all 13")


==See Also==
==See Also==

Revision as of 23:58, 10 September 2019

Creates a section of the Template:Master Gallery based on information stored through Template:Gallery Metadata.

Usage

{{Gallery Section (Cargo)
|character=
|location=
|weapon=
|source=
|section=
|artist=
|limit=
|widths=
|header=
|title=
|sort=
|see all=
|see cameos=
|count all=
}}

Reference Template:Gallery Metadata for character, location, weapon, source, section, and artist.

|limits= Optional, the max number of images to show before truncating and displaying a "show more" link. Defaults to 4.

|widths= Optional, the width of each image in the gallery. Defaults to 250 (matching the default for Template:Gallery Section)

|header= Optional, sets the header depth. Accepts the values h2, h3, h4, h5. Leaving this out will default the title to regular text.

|title= Optional, defines the text to be used as the header for this gallery section. (e.g. Birthday Art)

|sort= Optional. If set to date, the results will be sorted by descending date (with newer images after older ones). By default it sorts alphabetically.

|see all= Optional. Change to n to hide the "see all" button that appears next to the header, linking to all results. True by default.

|see cameos= Optional. Change to y to show a button to Special:ViewData that performs the same query, but with the character as a cameo instead. (e.g. Izayoi showing up in Hakumen's Arcade Mode)

|count all= Optional. Put a number here to display it next to the "see all" message (e.g. "see all 13")

See Also