Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Search
Editing
DPL3/Parameters: Controlling output format
(section)
From KB42
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===headingmode=== {{DPL parameter |name = headingmode |purpose= To control the output of the headings in a DPL with complex/multi-parameter {{dpl3|ordermethod}}. (No effect with single-param ordermethods.) For {{dpl3|ordermethod|=''method1,method2,...''}}, ''method1'' is used for headings. E.g. {{dpl3|headingmode}} affects category headings in {{dpl3|ordermethod|=category,title}} (2-param ordermethod). See also {{dpl3|headingcount}} }} Syntax: {{DPL syntax|headingmode=''modename''}} ''modename'' can be one of: * ''none'' — headings are not displayed, no heading — '''(default)''' * ''unordered'' — outputs an unordered list — HTML tag {{tt|ul}} * ''ordered'' — outputs an ordered list — HTML tag {{tt|ol}} * ''definition'' — outputs a definition list — HTML tag {{tt|dl}} * ''H2'' — outputs sections — HTML tags {{tt|H2}} {{red|Currently broken}} * ''H3'' — outputs sections — HTML tags {{tt|H3}} {{red|Currently broken}} * ''H4'' — outputs sections — HTML tags {{tt|H4}} {{red|Currently broken}} Example: <!-- originally, category=Africa|Europe --> <pre><nowiki> <dpl> category=Terraria Wiki|Community notcategory=Games nottitlematch=%d%|Disambiguations count=7 ordermethod=category,title headingmode=definition mode=ordered </dpl> </nowiki></pre> This list will output pages that belong to one of the categories Terraria Wiki, Community in a list similar to this (HTML source). The categories are listed in sorted order, and the titles are replaced with the appropriate links ({{dpl3|nottitlematch}} and {{dpl3|count}} are simply used to reduce the output size): {| ! '''(HTML) Output''' !! '''Actual Output''' |- style="vertical-align:top;" |<pre><nowiki> <dl> <dt>Category</dt> <dd> <ol> <li>Page1</li> <li>Page2</li> </ol> </dd> </dl> </nowiki></pre> | <dpl> category=Terraria Wiki|Community notcategory=Games nottitlematch=%d%|Disambiguations count=7 ordermethod=category,title headingmode=definition mode=ordered </dpl> |} Headingmode can be used with multi-column output but the length of the columns may in this case vary more than you would expect.
Summary:
Please note that all contributions to KB42 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
KB42:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
DONATE
Wiki tools
Wiki tools
Special Pages
Categories
Import Pages
Cargo data
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs