Module:Utilities/doc

From Sun Haven Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Utilities

This module is designed to hold cross category utility functions. It is not a catch all for 'I don't know where to put this' functions.

Repeat Template

A comma separated list of pages containing table data already, in the format <PageName>!<DataType> And / Or a commas separated list of custom data, in the format <Col1> @ <Col2> @ <ColN> When mixing and matching custom row data with page data, try and match the same number of columns This method only formats the data, you will still need to provide a header row

Format

recipes = Omelet!Food, Veggie Wrap!Food, Chili!Food

The data for recipes are stored in the `FoodRow` thus recipes use !Food.

datum = row1 col1 @ row1 col2 @ row1 col3, row2 col1 @ row2 col2 @ row2 col3 

This custom data will generate a 2 rows for a table of 3 columns in width

datum = Omelet!Food, 
row2 col1 @ row2 col2 @ row2 col3 @ row2 col4 @ row2 col5 @ row2 col6, 
Chili!Food

This custom data will generate a 3 rows: Recipe, Custom, Recipe

Example

{{#invoke:Utilities|repeatTemplate|Omelet!FoodRow, row2 col1 @ row2 col2 @ row2 col3 @ row2 col4 @ row2 col5 @ row2 col6, Chili!FoodRow}}
|}


CSV To Bulleted List

A comma separated list to be turned into a bulleted list all off the same indentation

Format

datum = Omelet, Veggie Wrap, Chili

A simple comma separated list

Example

{{#invoke:Utilities|csv2bullets|Omelet, {{icon|Veggie Wrap}}, I prefer {{Currency|Coins}} over {{Currency|Tickets}}}}


Function N

Function descriptor

Format

<onlyinclude>
Sample Code Formatting
</onlyinclude>

Example

Sample code to display

Execution code

Subpages