Difference between revisions of "Template:ItemList"

From Nookipedia, the Animal Crossing wiki
m (Wrong parameter... *crossing fingers*)
m (Text replacement - "width="(.*?)" style="" to "style="width: $1; ")
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
<noinclude>{{Deprecated|replacement=[[Template:TableTop]]}}</noinclude>
 
{{#switch:{{{game|}}}
 
{{#switch:{{{game|}}}
 
<!-- DnM, DnM+, AC, DnMe+ Table -->
 
<!-- DnM, DnM+, AC, DnMe+ Table -->
Line 12: Line 13:
 
'''{{{title|Please enter a title.}}}'''
 
'''{{{title|Please enter a title.}}}'''
 
<div class="mw-collapsible-content">|}}
 
<div class="mw-collapsible-content">|}}
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible collapsed|}}}}" {{#if: {{{embed|}}}||align="center"}} width="{{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
+
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible collapsed|}}}}" {{#if: {{{embed|}}}||align="center"}} style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 29: Line 30:
 
'''{{{title|Please enter a title.}}}'''
 
'''{{{title|Please enter a title.}}}'''
 
<div class="mw-collapsible-content">|}}
 
<div class="mw-collapsible-content">|}}
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible collapsed|}}}}" {{#if: {{{embed|}}}||align="center"}} width="{{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
+
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible collapsed|}}}}" {{#if: {{{embed|}}}||align="center"}} style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 47: Line 48:
 
'''{{{title|Please enter a title.}}}'''
 
'''{{{title|Please enter a title.}}}'''
 
<div class="mw-collapsible-content">|}}
 
<div class="mw-collapsible-content">|}}
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible collapsed|}}}}" {{#if: {{{embed|}}}||align="center"}} width="{{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
+
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible collapsed|}}}}" {{#if: {{{embed|}}}||align="center"}} style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 61: Line 62:
 
<!-- ACNL Table -->
 
<!-- ACNL Table -->
 
| ACNL
 
| ACNL
| NL = {{#if: {{{embed|}}}|<div {{#if: {{{collapsible|}}}|class="mw-collapsible"|}} style="margin:auto; width:80%; background:#FFDD66; border: 4px solid #FFDD66; text-align:center; {{roundy}}">
+
| NL = {{#if: {{{embed|}}}|<div {{#if: {{{collapsible|}}}|class="mw-collapsible mw-collapsed"|}} style="margin:auto; width:80%; background:#FFDD66; border: 4px solid #FFDD66; text-align:center; {{roundy}}">
 
'''{{{title|Please enter a title.}}}'''
 
'''{{{title|Please enter a title.}}}'''
 
<div class="mw-collapsible-content">|}}
 
<div class="mw-collapsible-content">|}}
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible|}}}}" {{#if: {{{embed|}}}||align="center"}} width="{{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
+
{{(!}} class="sortable {{#if: {{{embed|}}}||{{#if: {{{collapsible|}}}|collapsible|}}}}" {{#if: {{{embed|}}}||align="center"}} style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; {{#if: {{{embed|}}}||border: 4px solid #FFDD66;}} {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 98: Line 99:
 
| DnMe+ floor
 
| DnMe+ floor
 
| AFe+ wall
 
| AFe+ wall
| AFe+ floor = {{(!}} class="sortable" align="center" width="{{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
+
| AFe+ floor = {{(!}} class="sortable" align="center" style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 111: Line 112:
 
| WW floor
 
| WW floor
 
| ACWW wall
 
| ACWW wall
| ACWW floor = {{(!}} class="sortable" align="center" width="{{{width|100%}}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
+
| ACWW floor = {{(!}} class="sortable" align="center" style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 124: Line 125:
 
| CF floor
 
| CF floor
 
| ACCF wall
 
| ACCF wall
| ACCF floor = {{(!}} class="sortable" align="center" width="{{{width|100%}}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
+
| ACCF floor = {{(!}} class="sortable" align="center" style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 136: Line 137:
 
| NL floor
 
| NL floor
 
| ACNL wall
 
| ACNL wall
| ACNL floor = {{(!}} class="sortable" align="center" width="{{{width|100%}}}" cellspacing="0px" cellpadding="1px" style="background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
+
| ACNL floor = {{(!}} class="sortable" align="center" style="width: {{#if: {{{embed|}}}|100%|80%}}" cellspacing="0px" cellpadding="1px; background:#FFDD66; text-align:center; border: 4px solid #FFDD66; {{roundy}}"  
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; background-color:#FFDD66; color:#000; {{roundytl|7px}}" {{!}} Item
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
 
! style="border-bottom:4px solid #FFDD66; border-right: 2px solid #FFDD66; border-left: 2px solid #FFDD66; background-color:#FFFFCC; color:#666;" {{!}} Image
Line 174: Line 175:
 
<br clear=all>
 
<br clear=all>
 
===Wallpaper & flooring tables===
 
===Wallpaper & flooring tables===
Each game has a corresponding wallpaper and flooring table associated with it. This may be a stand-alone table, or can be embedded in other tables.
+
Each game has a corresponding wallpaper and flooring table associated with it. This can be used be a stand-alone table, or can be embedded in other tables.
  
 
<tt>'''<nowiki>{{ItemList|game=AC wall}}</nowiki>{{tt|*|<nowiki>Parameters "DnM wall", "DnM+ wall", "AC wall", "DnMe+ wall", and "WW wall" will produce the same table</nowiki>}}''' produces:</tt>
 
<tt>'''<nowiki>{{ItemList|game=AC wall}}</nowiki>{{tt|*|<nowiki>Parameters "DnM wall", "DnM+ wall", "AC wall", "DnMe+ wall", and "WW wall" will produce the same table</nowiki>}}''' produces:</tt>
Line 180: Line 181:
 
|}
 
|}
 
<br>
 
<br>
<tt>'''<nowiki>{{ItemList|game=CF wall|width=80%}}</nowiki>''' produces:</tt>
+
<tt>'''<nowiki>{{ItemList|game=CF wall}}</nowiki>''' produces:</tt>
{{ItemList|game=CF wall|width=80%}}
+
{{ItemList|game=CF wall}}
 
|}
 
|}
 
<br>
 
<br>
Line 188: Line 189:
 
|}
 
|}
 
<br>
 
<br>
 
'''Note:''' If width is not set, table will default to 100% width.
 
  
 
==Usage==
 
==Usage==
Line 198: Line 197:
 
|embed=
 
|embed=
 
|title=
 
|title=
|width=
 
 
}}
 
}}
 
</pre>
 
</pre>
Line 210: Line 208:
  
 
*'''title:''' This parameter is only used in conjunction with embed. The embed parameter encapsulates the table(s) in a div; text placed in the title parameter will appear as the table heading.
 
*'''title:''' This parameter is only used in conjunction with embed. The embed parameter encapsulates the table(s) in a div; text placed in the title parameter will appear as the table heading.
 
*'''width:''' Adjust width of wall/floor tables by entering an appropriate value (e.g. 80%, 100%). <sup>(Because I can't figure out how to get them working properly otherwise...)</sup>
 
  
 
<center>
 
<center>
Line 225: Line 221:
 
</center>
 
</center>
 
'''Note:''' It does not matter whether one uses "AC wall" or "AC floor", they will result in the same table.
 
'''Note:''' It does not matter whether one uses "AC wall" or "AC floor", they will result in the same table.
 +
 +
[[Category:Table templates]]

Latest revision as of 16:40, July 13, 2021

Lucky NH Villager Icon.png
This template is deprecated and should no longer be used.
This template's functionality has been superseded by Template:TableTop and all instances of this template should be updated to the linked template instead.
Lucky NH Villager Icon.png
This template is deprecated and should no longer be used.
This template's functionality has been superseded by Template:TableTop and all instances of this template should be updated to the linked template instead.

Template:ItemList


Example

{{ItemList|game=AC}}* produces:

Item Image Buy Price Sell Price Available From Group Feng Shui Size Info


{{ItemList|game=WW|collapsible=yes}} produces:


{{ItemList|game=CF|embed=yes|title=This is a test}} produces:

This is a test

Item Image Buy Price Sell Price Available From Color(s) Genres Size Info


{{ItemList|game=NL|embed=yes|collapsible=yes|title=This is a test}} produces:

This is a test

Item Image Buy Price Sell Price Available From Color(s) HHA Theme Style Size Info Customize


Important: Use of the embed parameter (with non-wall/floor tables) creates two divs which must be closed "" AFTER the table end markup "|}".


Wallpaper & flooring tables

Each game has a corresponding wallpaper and flooring table associated with it. This can be used be a stand-alone table, or can be embedded in other tables.

{{ItemList|game=AC wall}}* produces:

Item Image Buy Price Sell Price Available From Group


{{ItemList|game=CF wall}} produces:

Item Image Buy Price Sell Price Available From


{{ItemList|game=NL wall}} produces:

Item Image Buy Price Sell Price Color HHA Theme Style Available From


Usage

{{ItemList
|game= 
|collapsible=
|embed=
|title=
}}

Parameters:

  • game: Enter the appropriate abbreviation to display an item table with headings corresponding to that AC title. For ease of use the template accepts several abbreviation variations, as seen below.
  • collapsible: Enter any string to make the table collapsible. If no value is entered the table will not be collapsible.
  • embed: Enter any string to produce a table that allows for other tables to be embedded inside it (e.g. wall/floor tables) while maintaining column-sorting functionality. OR If a wall/floor table is designated in the game parameter, it will produce an embeddable wall/floor table.
  • title: This parameter is only used in conjunction with embed. The embed parameter encapsulates the table(s) in a div; text placed in the title parameter will appear as the table heading.
Acceptable game Parameters
Furniture: DnM, AF, DnM+, AF+, AC, ACGC, PG, DnMe+, AFe+, WW, ACWW, CF, ACCF, NL, ACNL
Wall/Floor: DnM wall, DnM floor, AF wall, AF floor, DnM+ wall, DnM+ floor, AF+ wall, AF+ floor, AC wall, AC floor, ACGC wall, ACGC floor, PG wall, PG floor, DnMe+ wall, DnMe+ floor, AFe+ wall, AFe+ floor, WW wall, WW floor, ACWW wall, ACWW floor, CF wall, CF floor, ACCF wall, ACCF floor, NL wall, NL floor, ACNL wall, ACNL floor

Note: It does not matter whether one uses "AC wall" or "AC floor", they will result in the same table.