Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.edit

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!

User:Faltout/SandBox/Quests in category table

From DDO wiki
Jump to navigation Jump to search

Usage[edit]

This template performs a DPL query to find and list all pages that use the template {{Quest}} under one or more categories. It then uses a given phantom template to display the results.

{{Quests in category table
  |categories =
  |andcategories =
  |notcategories =
  |template =
  |phantom =
  |tablesortcol =
}}
  • categories is a set of categories to search in. Separated by the character ¦.
  • andcategories is an optional list of categories that the pages selected should also be part of. Separated with the character ¦.
  • notcategories is optional and contains a list of categories that the selected pages shouldn't belong to. Separated by the character ¦.
  • template is the full template name (including "Template:") that the pages selected will be using.
  • phantom is the name of the phantom template that should be used to parse and display quest information.
  • tablesortcol is an optional parameter. In case your phantom template generates a sortable table, |tablesortcol= can specify an initial column to be sorted. Columns start from 1 and are sorted with ascending values. A negative number means the column will be sorted with descending values.

The phantom template must have a certain format.

  1. It must generate the table heading when asked to
  2. It must generate the table footer when asked to.
  3. It must generate one table row otherwise.

To better generate the table heading and footer, it is passed additional parameters

{{My_phantom_template
  |tableheadings= <!-- If this parameter contains something, the template should only produce the table headers -->
  |tablefooter= <!-- If this parameter contains something, the template should only produce the ending of the table -->
  |categories= <!-- In case one of the above parameters contains something, this parameter will contain categories-->
  |andcategories= <!-- Same as categories -->
  |notcategories= <!-- Same as categories -->
<!--
  Any of the parameters of the chosen template (from the "template" parameter)
-->
}}
  • tableheadings If it contains something, the phantom template should only produce the table headers as well as the table start symbol {|. So, it can produce things before the table starts, the class of the table and the headers.
  • tablefooter If it contains something, the phantom template should only produce the table ending with the table end symbol |}. So, it can enter more table rows till the table closes and more things after the table closes.
  • categories/andcategories/notcategories In case one of the above contains something, those parameters will contain the |categories=, |andcategories= and |notcategories= passed to this template respectively. This should help the phantom template produce better headings and footer.
  • If none of the above parameters contain anything, then the template should produce table rows starting from the row start symbol |- followed by lines containing the contents of the cells of that row. The contents of the cells can be generated using any of the parameters that the template specified in |template= uses.

List of phantom templates[edit]

See Category:Phantom templates

CODE[edit]

Specify a category or categories in {{{categories}}} (separated with ¦) to select pages from.
Specify the template that the selected pages use in {{{template}}}. Use the full name of the template (including the namespace "Template:").
Specify a phantom template in the parameter {{{phantom}}} that will parse the parameters of {{[[Template:{{{template}}} |{{{template}}} ]]}} and display them in table columns.
DPL not executed.