Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Examples/Parameter: title (example 2): Difference between revisions

m
Adapt this to a different use, it was not really appropriate to have on the page selection page (too complex, and that page describes entirely different use, this is more suited to the include page, though I may still leave it as "criteria for page selection" and/or "title" (I haven't decided yet).
imported>FrozenPlum
m (forgot to preview)
imported>FrozenPlum
m (Adapt this to a different use, it was not really appropriate to have on the page selection page (too complex, and that page describes entirely different use, this is more suited to the include page, though I may still leave it as "criteria for page selection" and/or "title" (I haven't decided yet).)
Line 6:
==Example==
 
This will select the [[Apple]] article, which uses [[Template:Color]] on its page more than once. The <code>{{DPL|include}}</code> statement both includes all parameters available in [[Template:Color]], '''and''' it passes their values to a surrogate template, [[Template:Color.templatevalues]] for formatting. The use of <code>{{DPL|title}}</code> is unique, it implicitly sets <code>mode=userformat</code>, which allows additional control over the output, and allows <code>{{DPL|secseparators}}</code> to be used. The first argument of <code>secseparators</code> sets nothing <code>,</code> to be displayed before each result, then its second argument sets a line break <code>\n</code> and four hyphens <code>----</code> (which create a horizontal rule/line). Another line break <code>\n</code> puts each result below that line. Without the <code>secseparators</code> statement, each result would appear side by side instead.
This example will take all invocations of template "Color" in article '''[[Apple]]''' and will include and apply "Template:Color.templatevalues". The output will be separated, at the top of each page, by horizontal lines.
 
<pre>
Line 12:
|title=Apple
|include={Color}.templatevalues
|secseparators=,\n----\n
|mode = userformat
|secseparators=\n----\n
}}
</pre>
Line 22 ⟶ 21:
|title=Apple
|include={Color}.templatevalues
|secseparators=,\n----\n
|mode = userformat
|secseparators=\n----\n
}}
 
<noinclude>
[[Category:Select by title-related criteria]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.