Template:RecipeList: Difference between revisions
imported>Aramachus removed the notcategory desynth, added some comments and minor improvements and added a bit of documentation |
imported>Aramachus passing rank as argument to the phantom template |
||
| Line 5: | Line 5: | ||
<!--|notcategory={{{craft}}}/Desynthesis --> <!-- this does NOT work because if there is a desynth recipe on a page, the entire page is categorized as desynth and excluded here --> |
<!--|notcategory={{{craft}}}/Desynthesis --> <!-- this does NOT work because if there is a desynth recipe on a page, the entire page is categorized as desynth and excluded here --> |
||
|notcategory=High Quality <!-- HQ pages are covered by their NQ pages --> |
|notcategory=High Quality <!-- HQ pages are covered by their NQ pages --> |
||
|include={Synthesis Recipe |
|include={Synthesis Recipe}.RecipeList¦phantom_arg={{{rank}}},##Horizon Changes.* |
||
|table=class="horizon-table {{#if:{{{colorclass|}}}|{{{colorclass}}}|{{lc:{{{craft}}}}}-table}} center-col-2 center-col-3 sortable",-,Item,Cap,Crystal,class="unsortable"{{!}}Ingredients,class="unsortable"{{!}}HQ,Horizon Changes {{Changes}} |
|table=class="horizon-table {{#if:{{{colorclass|}}}|{{{colorclass}}}|{{lc:{{{craft}}}}}-table}} center-col-2 center-col-3 sortable",-,Item,Cap,Crystal,class="unsortable"{{!}}Ingredients,class="unsortable"{{!}}HQ,Horizon Changes {{Changes}} |
||
|tablesortcol=3<!-- need to use +1 here because the additional linebreak at the beginning of the phantom template that is used to apply classes and styles to the rows somehow counts as a column here --> |
|tablesortcol=3<!-- need to use +1 here because the additional linebreak at the beginning of the phantom template that is used to apply classes and styles to the rows somehow counts as a column here --> |
||
Revision as of 12:02, 30 October 2024
Usage
Template that generates a dpl table for a given craft for a given rank.
Parameters
- craft: craft for which the table is to be generated
- rank: which rank is supposed to be displayed
- colorclass (optional): by default, the table uses the coloring theme of the craft. If another coloring is desired, use this class.
Example
{{RecipeList|craft=Alchemy|rank=Apprentice}}
Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:RecipeList: The DynamicPageList4 extension (version 4.0.0) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DynamicPageList4 or an error that you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy <code>*?</code> matching patterns are not supported.<br/>The error message was:<br/><code>Error 1054: Unknown column 'ecl1.cl_to' in 'WHERE' Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:RecipeList Query: SET STATEMENT max_statement_time=10 FOR SELECT DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title` FROM `page` `p` JOIN `categorylinks` `cl1` ON (((p.page_id = cl1.cl_from) AND (cl1.cl_to = 'Alchemy/Apprentice'))) LEFT JOIN `categorylinks` `ecl1` ON (((p.page_id = ecl1.cl_from) AND (ecl1.cl_to = 'Alchemy/Subcraft'))) LEFT JOIN `categorylinks` `ecl2` ON (((p.page_id = ecl2.cl_from) AND (ecl2.cl_to = 'High_Quality'))) WHERE p.page_is_redirect = 0 AND ecl1.cl_to IS NULL AND ecl2.cl_to IS NULL LIMIT 500 </code>