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!
== Setting the basic output mode == ===mode=== {{DPL parameter |name = mode |purpose= Provide basic control over the output of DPL. }} Syntax: {{DPL syntax|mode=''modename''}} <u>''modename'' can be one of:</u> ;''unordered'': outputs an unordered list — HTML tag {{tt|ul}} — '''(default)''' ;''ordered'': outputs an ordered list — HTML tag {{tt|ol}} ;''none'': outputs a list using newlines and HTML tags {{tt|br/}} to separate each item ;''inline'': outputs a list using symbols defined by the {{dpl3|inlinetext}} parameter to separate items ;''category'': outputs resulting articles in a way category-pages are shown ('''you must use {{dpl3|ordermethod| = title / titlewithoutnamespace / category,title / user,title}} with this option!''') ;''userformat'': will leave output control completely to the user; <br/> see parameters {{dpl3|listseparators}} and {{dpl3|secseparators}}; in this mode DPL offers built-in variables which must be referenced in the output format description provided by the user. '''{{dpl3|mode|=userformat}}''' is quite important to have complete control over the output. For advanced use of DPL it is important to understand {{dpl3|mode|=userformat}}. Note that this mode is '''automatically implied''' when {{dpl3|listseparators|=}} or {{dpl3|format|=}} are used. ==== mode 'ordered', 'unordered', 'none' (Example1) ==== These create abbreviated lists of [[:Category:DPL3]] pages: <!-- originally, Example, category=Africa, and there was no titlematch --> {| style="border-spacing: 10px 0;" | align=center| In an {{tag|ol}} list: || align=center| In a {{tag|ul}} list: || align=center| In a {{tag|br/|open}} list: |- style="vertical-align:middle;" |<pre><nowiki> <dpl> category=DPL3 titlematch=%o% nottitlematch=%nt%|%ow%|%ec% mode=ordered </dpl> </nowiki></pre> |<pre><nowiki> <dpl> category=DPL3 titlematch=%o% nottitlematch=%nt%|%ow%|%ec% mode=unordered </dpl> </nowiki></pre> |<pre><nowiki> <dpl> category=DPL3 titlematch=%o% nottitlematch=%nt%|%ow%|%ec% mode=none </dpl> </nowiki></pre> |- |<dpl> category=DPL3 titlematch=%o% nottitlematch=%nt%|%ow%|%ec% mode=ordered </dpl> |<dpl> category=DPL3 titlematch=%o% nottitlematch=%nt%|%ow%|%ec% mode=unordered </dpl> |<dpl> category=DPL3 titlematch=%o% nottitlematch=%nt%|%ow%|%ec% mode=none </dpl> |} ==== mode 'category' (Example2) ==== <!-- originally, Example2, titlematch=%frica% --> <pre><nowiki> <dpl> titlematch=%Help% includesubpages=false mode=category ordermethod=titlewithoutnamespace </dpl> </nowiki></pre> This list will output pages that have 'Help' in their name; pages will be ordered by their name regardless of category, the output will be shown in category style (i.e. with chapter capitals). <dpl> titlematch=%Help% includesubpages=false mode=category ordermethod=titlewithoutnamespace </dpl> Related configuration option (see [https://www.mediawiki.org/wiki/Extension:DynamicPageList3 Extension:DynamicPageList3 on MediaWiki Wiki]: <code>$wgDPL2CategoryStyleListCutoff</code>. ==== mode 'inline' ==== =====inlinetext===== {{DPL parameter |name = inlinetext |purpose= To define the inline text used in {{dpl3|mode|=inline}}. }} Syntax: {{DPL syntax|inlinetext=''wikitext''}}, with ''wikitext'' as some wiki text; '''default is <code>{{&|nbsp}}-{{&|nbsp}}</code>''' except for {{dpl3|mode|=userformat}} where {{dpl3|inlinetext}} is empty by default. If you want normal "breaking spaces" (and not the NON-breaking spaces) you should use <code>{{&|#32}}-{{&|#32}}</code>. Extra whitespaces are stripped by DPL from the beginning and end of ''wikitext''. If you want to show one or multiple spaces, use one or multiple <code>{{&|nbsp}}</code>, or use 'nowiki' tags {{tag|nowiki|p| - }} which has the same effect as <code>{{&|nbsp}}-{{&|nbsp}}</code>. Bullets can be displayed with either <code>{{&|bull}}</code> or {{tl|*}}. Example: <!-- originally, category=Africa --> <pre><nowiki> <dpl> category = Help includesubpages= false count = 10 mode = inline inlinetext = &nbsp; &bull; &nbsp; </dpl> </nowiki></pre> This list outputs pages that have [[:Category:Help]] shown like Item1 • Item2 • Item3 • ... <dpl> category = Help includesubpages = false count = 10 mode = inline inlinetext = • </dpl> ==== {{anchor|userformat}}mode 'userformat' ==== =====listseparators===== {{DPL parameter |name = listseparators |purpose= (alias for format) see the {{dpl3|format}} parameter. Implicitly sets {{dpl3|mode|=userformat}}. }} =====format===== {{DPL parameter |name = format |purpose= customize the output format completely. Implicitly sets {{dpl3|mode|=userformat}}. Uses variable references like {{tt|%PAGE%}} to describe the output format. See also the {{dpl3|secseparators}} parameter. }} Note1: {{dpl3|listseparators}} is an alias for {{dpl3|format}}. Note2: the {{dpl3|format}} command is very flexible but somewhat complicated. If you want to create tabular output, you should have a look at the {{dpl3|table}} command. Syntax: {{DPL syntax|format=''Startall'',''Start'',''End'',''Endall''}} ''Startall'', ''Start'', ''End'' and ''Endall'' are wiki tags used to separate the list items. * ''Startall'' and ''Endall'' define an outer frame for the whole list. * ''Start'' and ''End'' build an inner frame for each article item. Because wiki syntax depends on newline characters, {{code|\n}} or {{code|¶}} must be used to explicitly insert newline characters into the output. As we want to be able to control output completely, we reference article names and other possible output by special {{dpl3|VARIABLES|%VARIABLES%}}: {{anchor|VARIABLES}} * {{tt|%NR%}} = the current article sequence number (starting from 1) * {{tt|%PAGE%}} = the name of the article (including namespace) * {{tt|%PAGEID%}} = the internal unique numeric ID of the article page * {{tt|%IMAGE%}} = the physical path to an image (based on hash values, e.g. ''5/5d/myImage.jpg'') * {{tt|%PAGESEL%}} = the name of a page which was used within the selection criteria (only applies to {{dpl3|linksfrom}} and {{dpl3|linksto}}) * {{tt|%IMAGESEL%}} = the name of an image which was used within the selection criteria (only applies to {{dpl3|imageused}}) ---- * {{tt|%TITLE%}} = the title of the page (without the namespace) * {{tt|%NAMESPACE%}} = the namespace of the page ---- * {{tt|%SIZE%}} = the article size (requires {{dpl3|addpagesize|=true}}) * {{tt|%SIZEFS%}} = a font size number which is based on the article size (logarithm of square root of counter) * {{tt|%COUNT%}} = the usage counter (requires {{dpl3|addpagecounter|=true}}) {{red|Removed in MediaWiki 1.25}}<ref name=hitcounters/> * {{tt|%COUNTFS%}} = a font size number which is based on the usage counter (currently this is the logarithm of the usage counter) {{red|Removed in MediaWiki 1.25}}<ref name=hitcounters/> * {{tt|%COUNTFS2%}} = similar to {{tt|%COUNTFS%}}, but based on the logarithm of the square root of the usage counter {{red|Removed in MediaWiki 1.25}} <ref name=hitcounters/> ---- * {{tt|%DATE%}} = the date selected, eg. {{tt|lastedit}}; requires {{dpl3|addeditdate|=true}} or similar; the formatting of the date can be influenced using {{dpl3|userdateformat|=}} * {{tt|%USER%}} = the user who changed the document last; requires {{dpl3|adduser|=true}} ---- * {{tt|%CONTRIBUTOR%}} = the user who made a contribution; requires {{dpl3|addcontribution|=true}} * {{tt|%CONTRIBUTION%}} = the number of bytes changed; requires {{dpl3|addcontribution|=true}} * {{tt|%CONTRIB%}} = an asterisk bar to indicate the amount of change; requires {{dpl3|addcontribution|=true}} ---- * {{tt|%CATLIST%}} = a pipe-separated list of links to all categories to which the article belongs (requires {{dpl3|addcategories|=true}}) * {{tt|%CATBULLETS%}} = a bullet point list of links to all categories to which the article belongs (requires {{dpl3|addcategories|=true}}) * {{tt|%CATNAMES%}} = a comma-separated list of all categories to which the article belongs (requires {{dpl3|addcategories|=true}}) ---- * {{tt|%REVISION%}} = the name of the revision of the article; only accessible if the DPL query is based on {{dpl3|REVISION|revisions}} * {{tt|%EDITSUMMARY%}} = the change log message of a revision; only accessible if the DPL query is based on {{dpl3|REVISION|revisions}} ---- * {{tt|%EXTERNALLINK%}} = the external hyperlink found as a consequence of the {{dpl3|linkstoexternal}} statement ---- These variables will be replaced by the corresponding values if they occur within ''Start'' or ''End'' or within the corresponding tags of the {{dpl3|secseparators|=}} parameter. ---- In addition there are some symbolic variables which can ONLY be used in {{dpl3|resultsheader}} and {{dpl3|resultsfooter}}: * {{tt|%PAGES%}} = number of articles in the result set * {{tt|%TOTALPAGES%}} = total number of articles in the result set, regardless of count limits; will only be calculated if used * {{tt|%VERSION%}} = the current DPL version ---- * {{tt|%DPLTIME%}} = contains the amount of time (in seconds + milliseconds) spent within DPL; this can be helpful if you observe slow response times for wiki pages that contain DPL statements. Example: ''2 (2009/06/13 09:27:43)'' would mean that DPL spent two seconds of the whole response time, starting at the time given in brackets. ---- * {{tt|%FIRSTNAMESPACE%}}, {{tt|%FIRSTTITLE%}}, {{tt|%LASTNAMESPACE%}}, {{tt|%LASTTITLE%}} = namespace and title of the first / last article in the result set; the information is intended to be used for page scrolling * {{tt|%SCROLLDIR%}} = set by the URL parameter {{tt|DPL_scrollDir}}; it is passed to the scroll helper template which uses it to produce its links for scrolling ---- For example, the classical default output of DPL can also be produced with the following statements: <!-- originally, category=Africa, and there was no titlematch/nottitlematch--> {| style="border-spacing: 10px 0;" | align=center| default || align=center| formatted |- style="vertical-align:top;" |<pre><nowiki> <dpl> titlematch = %Help% nottitlematch = %o% includesubpages = false </dpl> </nowiki></pre> |<pre><nowiki> <dpl> titlematch = %Help% nottitlematch = %o% includesubpages = false format = ,\n* [[%PAGE%]],, </dpl> </nowiki></pre> |- |<dpl> titlematch = %Help% nottitlematch = %o% includesubpages = false </dpl> |<dpl> titlematch = %Help% nottitlematch = %o% includesubpages = false format = ,\n* [[%PAGE%]],, </dpl> |} Note that a bullet point list in wiki syntax is defined by a {{code|*}} at the ''beginning of a line'' — therefore we have to use a special symbol {{code|\n}} or {{code|¶}} to refer to the beginning of a new line of wiki text. Replace the {{code|*}} with a {{code|#}} and you will get a numbered list. {{tt|Startall}} and {{tt|Endall}} are empty (note that we start with a comma, note the two commas at the end), the {{tt|Start}} tag is used to create a new line with an initial <code>* </code> followed by the page name, written as a link. That's all. Creating a top-five hitlist with access rates and bold article names of varying size could be done like this: <pre><nowiki> <dpl> category = Help ordermethod = counter order = descending addpagecounter = true count = 5 format = ,\n%COUNT% --- <font size="%COUNTFS%">'''[[%PAGE%]]'''</font>,<br/>, </dpl> </nowiki></pre> However, {{dpl3|addpagecounter}}, {{dpl3|ordermethod|=counter}}, {{tt|%COUNT%}}, and {{tt|%COUNTFS%}} were removed in MediaWiki 1.25.<br/> Below is an example of how to use {{tt|%NR%}} to set the font size. <pre><nowiki> <dpl> category = Help order = descending addpagecounter = true count = 4 format = ,\n<font size="%NR%">'''[[%PAGE%]]'''</font>,<br/>, </dpl> </nowiki></pre> <dpl> category = Help order = descending addpagecounter = true count = 4 format = ,\n<font size="%NR%">'''[[%PAGE%]]'''</font>,<br/>, </dpl> You can also use HTML syntax for the tags, although this is discouraged. <pre><nowiki> <dpl> linksto = DPL format = <ul type="disc">,<li>[[%PAGE%]],</li>,</ul> </dpl> </nowiki></pre> <dpl> linksto = DPL format = <ul type="disc">,<li>[[%PAGE%]],</li>,</ul> </dpl> Now let us create a table using wiki syntax: <pre><nowiki> <dpl> linksto = DPL format = {| class="wikitable"¶!pages found,¶|-¶|[[%PAGE%]],,¶|} </dpl> </nowiki></pre> We use {{tt|Startall}} to define the table header and {{tt|Endall}} for the footer. Each article is presented in a table row using wiki syntax for table layout. <dpl> linksto = DPL format = {| class="wikitable"¶!pages found,¶|-¶|[[%PAGE%]],,¶|} </dpl> We could also produce image galleries: <pre><nowiki> <dpl> namespace = File category = Hydra images|Template images count = 6 format = <gallery widths=20px heights=20px>,%PAGE%\n,,</gallery> </dpl> </nowiki></pre> <dpl> namespace = File category = Hydra images|Template images count = 6 format = <gallery widths=20px heights=20px>,%PAGE%\n,,</gallery> </dpl> =====secseparators===== {{DPL parameter |name = secseparators |purpose= customize the output format of included sections. Can be used with standard output modes and with {{dpl3|mode|=userformat}}. }} Syntax: {{DPL syntax|secseparators=''Start1'',''End1'',''Start2'',''End2'',..,..}} or {{DPL syntax|secseparators=''Start''}} ''Please note that the semantics of this parameter '''have changed with version 0.9.6!'''. When upgrading to 0.9.6 it will probably be necessary to change the {{dpl3|secseparators}} statements. In the first syntax variant, specify ''pairs of tags'' which correspond to the {{dpl3|includepage}} statement. {{tt|StartN}} and {{tt|EndN}} are HTML strings or wiki tags which will be put around each transcluded section (see {{dpl3|includepage|=name1,name2,...}}). In the second syntax variant, specify just one element which will then be used as {{tt|StartN}} for all sections; in this case the second tag ({{tt|EndN}}) will be empty for all transcluded sections. Symbolic replacements of {{tt|%PAGE%}} etc. take place as described in {{dpl3|listseparators}}. In addition, the variable {{tt|%SECTION%}} can be used to refer to the section found (works only for chapter headings). If the same section occurs more than once in an article (or an article includes the same template more than once) all such occurences will be transcluded as a block and the {{dpl3|secseparators}} tags will only be put once around the whole block (but see {{dpl3|dominantsection}}). ======Example====== <!-- originally, linksto=Africa, includepage=#fruit,#color, with "fruit" & "color" column headers --> <pre><nowiki> <dpl> titlematch = DPL3/d% ignorecase = true linksto = Extension:DPL3/Manual listseparators = {|class="dpl secsep"¶!Pages found¶!Syntax¶!Example,¶|-¶|[[%PAGE%|%TITLE%]],,¶|} includepage = #Syntax,##Example.* secseparators = ¶|,,¶|,, count = 2 </dpl> </nowiki></pre> <dpl> titlematch = DPL3/d% ignorecase = true linksto = Extension:DPL3/Manual listseparators = {|class="dpl secsep"¶!Pages found¶!Syntax¶!Example,¶|-¶|[[%PAGE%|%TITLE%]],,¶|} includepage = #Syntax,##Example.* secseparators = ¶|,,¶|,, count = 2 </dpl> Use {{dpl3|listseparators}} to define a table with three columns and put a link to the article in the first column of each row. Use {{dpl3|secseparators}} to add more columns for each section found. There are two pairs for each transcluded section; the first element of each pair is a linefeed and a pipe (which define a new column in the table) and the second element of each pair is empty. Have a careful look at the {{code|¶}} symbols ({{code|\n}} can be used as an alternative). They always appear before a wiki syntax element which must be placed at the beginning of a new line. Thus, make sure that the wiki parser will understand them. Note: if an article does not contain a section named "Example", it will result in an empty cell in the table. As mentioned above, a single element can be used in the {{dpl3|secseparators}} statement in order to apply this as a start tag to all transcluded sections; so it could have also been written: ======Example 2====== <!-- originally, linksto=Africa, includepage=#fruit[50],#color[100 more..], with matching column headers --> <pre><nowiki> <dpl> titlematch = DPL3/d% ignorecase = true linksto = Extension:DPL3/Manual listseparators = {|class="dpl secsep"\n!Pages found\n!Syntax\n!Example,\n|-\n|[[%PAGE%|%TITLE%]],,\n|} includepage = #Syntax[84],##Example.*[180 more..] secseparators = \n| count = 3 </dpl> </nowiki></pre> Assuming that the chapters on ''Syntax'' and ''Example'' contain long texts, they can be truncated (eg. to 84 or 180 characters). A link which refers directly to those chapters will be generated automatically if needed. Be aware that truncating with {{code|[ ]}}can break text formatted with wikitext or tags such as {{tag|nowiki|o}}. <dpl> titlematch = DPL3/d% ignorecase = true linksto = Extension:DPL3/Manual listseparators = {|class="dpl secsep"\n!Pages found\n!Syntax\n!Example,\n|-\n|[[%PAGE%|%TITLE%]],,\n|} includepage = #Syntax[84],##Example.*[180 more..] secseparators = \n| count = 3 </dpl> =====multisecseparators===== {{DPL parameter |name = multisecseparators |purpose= put a tag between multiple transcluded parts which refer to the same template or chapter. }} Syntax: {{DPL syntax|multisecseparators=''sep1'',''sep2'',...}} The tags correspond to the transcluded section (see {{dpl3|includepage|=name1,name2,...}}). Symbolic replacements of {{tt|%PAGE%}} etc. take place as described in {{dpl3|listseparators}}. In addition, the variable {{tt|%SECTION%}} can be used to refer to the section found (works only for chapter headings). It will give you the precise name of each heading even if you used a regular expression (double ##) in the include statement. If an article uses the same template more than once you will get all references with {{tt|sepN}} as a separator. Example:<!-- <pre><nowiki><- ---original dpl example, changed below to present a working example--- -> <dpl> category=TestSSt includepage={interfaces_overview} dpl mode=userformat listseparators=¶{|class=sortable ¶!Interface ¶!Source system ¶!Target system ¶!Technology,¶|-¶|[[%PAGE%]] ¶,¶,¶|} secseparators = \n| multisecseparators=¶|-¶|&nbsp;| </dpl> </nowiki></pre>--> {| class="dpl multisec" |- class="dpl pre" |colspan=2|<pre><nowiki> <dpl> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include = {dpl manual}:[[%PAGE%|%TITLE%]],{dpl parameter}:name:purpose[50] mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|Fields cannot be formatted within the include¶|-¶!Page ¶!Name ¶!Purpose,¶|-,¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ¶|,,¶|class="dpl dark-background"|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </dpl> </nowiki></pre> |- |colspan=2| {| |<dpl> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include = {dpl manual}:[[%PAGE%|%TITLE%]],{dpl parameter}:name:purpose[50] mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|Fields cannot be formatted within the include¶|-¶!Page ¶!Name ¶!Purpose,¶|-,¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ¶|,,¶|class="dpl dark-background"|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </dpl> |} |- |colspan=2|Values cannot be formatted within {{dpl3|include}}, as formatting can only occur in formatting statements (in these examples {{dpl3|listseparators}}, {{dpl3|secseparators}}, and {{dpl3|multisecseparators}}). {{tt|%VARIABLES%}} can be omitted from the {{dpl3|include}}, and instead be placed in these formatting statements, for further formatting.<br/> We can achieve some field formatting by changing some of the above dpl statements: |- class="dpl cols2 pre" | include = {dpl manual}:{{code|%TITLE%|class="dpl light-background"}},{dpl parameter}:name:purpose[50] listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|Fields... secseparators¶|-¶!Page ¶!Name ¶!Purpose,¶|-,¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ¶|{{code|<nowiki>[[%PAGE%|{{#explode:,|:|1}}]]</nowiki>|class="dpl light-background"}},¶|class="dpl dark-background"|, | include = {dpl manual}:{{code||class="dpl light-background"}},{dpl parameter}:name:purpose[50] listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|%VARIABLES%... listseparators¶|-¶!Page ¶!Name ¶!Purpose,¶|-{{code|<nowiki>¶|[[%PAGE%|{{#explode:%TITLE%|:|1}}]]</nowiki>|class="dpl light-background"}},¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = {{code||class="dpl light-background"}},,¶|class="dpl dark-background"|,{{code|<nowiki>,¶|,</nowiki>|class="dpl light-background"}} |- class="dpl cols2" |<dpl> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include = {dpl manual}:%TITLE%,{dpl parameter}:name:purpose[50] mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|These fields are formatted within secseparators¶|-¶!Page ¶!Name ¶!Purpose,¶|-,¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ¶|[[%PAGE%|{{#explode:,|:|1}}]],¶|class="dpl dark-background"|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </dpl> |<dpl> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include = {dpl manual}:,{dpl parameter}:name:purpose[50] mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|%TITLE% is added and formatted within listseparators¶|-¶!Page ¶!Name ¶!Purpose,¶|-¶|[[%PAGE%|{{#explode:%TITLE%|:|1}}]],¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ,,¶|class="dpl dark-background"|,,¶|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </dpl> |- |colspan=2|Formatting handled by a phantom template (eg. [[Template:DPL_parameter_dpl]]) will apply to both {{dpl3|secseparators}} and {{dpl3|multisecseparators}}.<br/>If separate formatting is required, it needs to be assigned to their respective parameters (as shown below). |- |colspan=2|To prevent truncated words, see [[Template:DPL_parameter_dpl.nowordbreak]] (which uses [[Template:nowordbreak]]). |- |colspan=2|<pre><nowiki> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include = {dpl manual}:,{DPL parameter} dpl mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|Includes a phantom template¶|-¶!Page ¶!Name ¶!Purpose,¶|-¶|[[%PAGE%|{{#explode:%TITLE%|:|1}}]],¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ,,¶|class="dpl dark-background"|,,¶|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </nowiki></pre> |- class="dpl cols2" |<dpl> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include = {dpl manual}:,{DPL parameter} dpl mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|Includes a phantom template¶|-¶!Page ¶!Name ¶!Purpose,¶|-¶|[[%PAGE%|{{#explode:%TITLE%|:|1}}]],¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ,,¶|class="dpl dark-background"|,,¶|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </dpl> |<dpl> titlematch = DPL% nottitlematch = %volume%|%page selection% uses = Template:DPL Parameter include={dpl manual}:,{DPL parameter} dpl.nowordbreak mode = userformat listseparators = ¶{|class="wikitable sortable" ¶!colspan=3|Includes a phantom template with Template:nowordbreak¶|-¶!Page ¶!Name ¶!Purpose,¶|-¶|[[%PAGE%|{{#explode:%TITLE%|:|1}}]],¶|-¶|class="dpl blue-background" colspan=3|¶|-,¶|} secseparators = ,,¶|class="dpl dark-background"|,,¶|, multisecseparators= ,\n|-¶|¶|class="dpl light-background"| </dpl> |} As you can see, the results resemble the list generated on the [[Extension:DPL3/Manual|title page]] of this manual, whose dpl is as follows: <pre><nowiki> <dpl> nottitlematch=%volume%|%page selection% namespace = Help uses = Template:DPL parameter mode = userformat replaceintitle = @DPL Manual/@, include = {DPL Manual}:[[%PAGE%|%TITLE%]],{DPL parameter}/dpl listseparators={|class=wikitable,\n|-\n|,,\n|} secseparators=,,\n|\n{|class="wikitable sortable" width=100%\n!width=140px|name\n!purpose\n|-\n|,\n|} multisecseparators=,\n|-\n| allowcachedresults = true </dpl> </nowiki></pre> <dpl> nottitlematch=%volume%|%page selection% namespace = Help uses = Template:DPL parameter mode = userformat replaceintitle = @DPL Manual/@, include = {DPL Manual}:[[%PAGE%|%TITLE%]],{DPL parameter}/dpl listseparators={|class=wikitable,\n|-\n|,,\n|} secseparators=,,\n|\n{|class="wikitable sortable" width=100%\n!width=140px|name\n!purpose\n|-\n|,\n|} multisecseparators=,\n|-\n| allowcachedresults = true </dpl> See also {{dpl3|Test article structure}}. =====dominantsection===== {{DPL parameter |name = dominantsection |purpose= define a section with multiple occurrences as dominant, i.e. each piece of contents of this section (which is associated with a template call or a chapter within the original document) will create a separate output line. }} Syntax: {{DPL syntax|dominantsection=''number''}} between 1 and the number of arguments in your {{dpl3|includepage|=}} statement If there is only 0 or 1 piece of contents for the dominant section you will see no difference from normal DPL behaviour. Example: See the explanations at the [[#General approach to output formatting|top of this document]] to understand the meaning of dominantsection. Note: Using {{dpl3|dominantsection}} together with {{dpl3|table}} may lead to strange result formatting.
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