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!
=====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>
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