Nookipedia:Project Items/Table Templates

From Nookipedia, the Animal Crossing wiki
< Nookipedia:Project Items
Revision as of 22:01, June 15, 2024 by PanchamBro (talk | contribs) (→‎Template:TableFooter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Not THAT table! Even if it is shiny!

The following sections show you how each template works to create different parts of the table.[1] If you're still confused on how to use these templates, head over to some of the more completed furniture pages and edit the page to study the coding structure. If you need any one-on-one help, you can contact any of our members, preferably our more active, experienced ones (or sunmarsh, he's the complete moron absolute genius who made them). Oh, and remember to use the preview button before you save!

Template:TableTop[edit]

This template will automatically create a collapsible container for the table as well as its column heading labels. By inputting the correct parameters, the table will automatically generate a table with the appropriate amount of columns for the list you are creating. It is generally advisable however to create a new template using TableTop, with the ability to change the name of the template (e.g. Template:TableTop NH Furniture).

Usage[edit]

{{TableTop
|color          = items, bug, or fish (default is items)
|title          = 
|collapsible    = (default is not collapsible)
|collapsed      = (default is not collapsed)
|sortable       = (default is not sortable)
|column1        =
|column2        =
...
|columnX        =
}}
  • title - Specifies the title of the subject in question. Recommended to format parameter as {{{name|<subject>}}} in {{<game abbreviation>|nolink}} if creating a template using TableTop.
  • color - Specifies the color of the TableTop. List of colors is available here.
  • collapsible - Specifies if the table can be collapsed.
  • collapsed - Specifies if the table is collapsed by default.
  • sortable - Specifies if the table can sort values.
  • column1, column2, etc. - Species the column's name when in use.

Example[edit]

Let's say you want to create a furniture table for the Antique Series in Animal Crossing: New Horizons. You would first create a template using TableTop, such as with Template:TableTop NH Furniture, and then output the following wikitext code:

{{TableTop NH Furniture|name=Antique Series}}

and it produces:

Antique Series in Animal Crossing: New Horizons

# Item Image Buy price Sell price Available from HHA theme(s) Interact Customizable Size


Template:TableContent[edit]

This template formats each cell's contents appropriately and automatically creates new rows. It does not have any required parameters. This template is only advisable for games that do not currently have Cargo data.

Example[edit]

Let's try the template out on a bug table...

{{TableHeader|game=ACCF|type=insect|collection=other|title=List of bugs in ''Animal Crossing: City Folk''}}

{{TableContent|type=insect
| 1
| Common Butterfly
| [[File:Common Butterfly CF Icon.png|64px]]
| 90
| Common
| 50mm
| Near flowers
| <small>March - June:</small> 4AM - 7PM<br><small>September:</small> 8AM - 4PM
| J F <font color{{=}}"#32B311">'''M A M J'''</font> J A <font color{{=}}"#32B311">'''S'''</font> O N D
| -
}}
Important: Notice how the equals signs for the text in the months column are enclosed in brackets (<font color{{=}}...). This is because cell contents cannot contain a raw equals sign due to how the template is coded.


Produces:

List of bugs in Animal Crossing: City Folk

# Name Image Price Rarity Size Location Time Months Peak
1 Common butterfly Common Butterfly CF Icon.png 90 Common 50mm Near flowers March - June: 4 AM - 7 PM
September: 8 AM - 4 PM
J F M A M J J A S O N D -


Template:TableFooter[edit]

This template will produce the appropriate closing tags for a table and its container. If you don't end your tables with this tag, they will take up the entire page and may 'swallow' other elements on the page. That's not good! Your tables don't deserve this!

Optionally, the TableFooter can also use the parameter note either to provide attribution or to annotate some parts of the table. There is also an optional div parameter provided, though its use will soon be deprecated following consolidation of the two separate tables for furniture and interior items into one.

Example[edit]

{{TableTop NH Furniture|name=Antique Series}}

{{#invoke:NHFurnitureCargoQuery|main|limit=1|group by=nh_furniture.en_name|where=item_series='Antique'|order by=nh_furniture.catalog_num}}

{{TableFooter|note={{Community:ACNH Spreadsheet/Attribution}}}}

Output:

Antique Series in Animal Crossing: New Horizons

# Item Image Buy price Sell price Available from HHA theme(s) Interact Customizable Size
34 Antique bed antique bed  28,000 Bells  7,000 Bells  Nook's Cranny (upgraded)
Retro / Expensive Bed No 2.0×2.0
Includes data sourced from the Data Spreadsheet for Animal Crossing New Horizons, compiled and edited by 6480, noizhub, Ricky, chaiinchomp, saberslime, robotic_scarab, mollumisc, sunmarsh, kyrokey, obstinateRixatrix, jackiwi, Zalex, SuperHamster, kait, hyuum, Azarro, Czarcasm, cinnamon_swirlix, astronomyfortwo, Welcius, glowtopia, BriKun, Alyrei, dodocodes.com, StevieCoops, sneeze, Shiny190, TwistedPeach, LavaToaster, capstone, vmario, rocklamp, Alexis, Aeon, and PanchamBro.

References[edit]

  1. Important: Figuring out how {{TableTop}} works doesn't guarantee you getting those overpriced GracieGrace furniture.