Module:ProfessionList/doc: Difference between revisions

From Brighter Shores Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 17: Line 17:
|ftype4=queryString: string
|ftype4=queryString: string
|fuse4=Generates a table of recipes and activities from a Semantic MediaWiki query string.<br>
|fuse4=Generates a table of recipes and activities from a Semantic MediaWiki query string.<br>
queryString is just a selection of pages, from any combination of SMW properties and categories<br>
queryString is just a selection of pages, from any combination of SMW properties and categories.<br>
For pages with multiple recipes or activities, will make one entry into the results table for each<br>
For pages with multiple recipes or activities, will make one entry into the results table for each.<br>
the results table entries are the recipe/activity JSONs, with pageName and pageImage parameters added.
The results table entries are the recipe/activity JSONs, with pageName and pageImage parameters added.<br>
The results table is sorted by recipe/activity level, independent of profession.
}}
}}

Revision as of 22:31, 18 December 2024

This is a documentation subpage for Module:ProfessionList.
It contains usage information, categories, and other content that is not part of the original module page.
Module:ProfessionList requires Module:Currency.
Module:ProfessionList requires Module:RecipeTreeSearch.

This module is a helper module to be used by other modules; it may not designed to be invoked directly. See Brighter Shores:Lua/Helper modules for a full list and more information.

FunctionTypeUse
currency_cell(amount)amount: number, or nilReturns the HTML to create a table currency cell using module:currency._cell.

If instead it is supplied with nil then a 10x1 cell is created with the text "unknown".

Use within :node()
unknown_value_cell(size)size: integerReturns the HTML to create a 'size'x1 cell with the text "unknown".
Use within :node()
unknown_value_edit_cell(page,size)page: string name of page
size: integer
Returns the HTML to create a 'size'x1 cell with a link to edit the specified page.
Use within :node()
generate_recipe_table(queryString)queryString: stringGenerates a table of recipes and activities from a Semantic MediaWiki query string.

queryString is just a selection of pages, from any combination of SMW properties and categories.
For pages with multiple recipes or activities, will make one entry into the results table for each.
The results table entries are the recipe/activity JSONs, with pageName and pageImage parameters added.

The results table is sorted by recipe/activity level, independent of profession.