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: multisecseparators (example 3): Difference between revisions

m
Simplify
imported>FrozenPlum
m (Changed my mind, this note in the surrogate should be enough.)
imported>FrozenPlum
m (Simplify)
Line 6:
==Example==
 
This example contains all the same elements as the prior examples, only it uses a [[Template:DPL parameter.surrogateexample|surrogate/phantom template]] to format the second and third column of results. The first column is included in the <code>{{DPL|listseparators}}</code> statement, to prevent the page name from being repeated in every subsequent line. The second and third column, formatted in the surrogate, hascreates a link constructed to link to the page and's parameter name (assection, theand heading/chapterthen anchor to its matching page heading)<code><nowiki>[[{{{%PAGE%}}}#{{{name}}}|{{{name}}}]]</nowiki></code>. The third column, formatted indisplay the surrogate,"purpose" usestext the #subusing [[mw:Help:Extension:ParserFunctions##sub|Parser (string) FunctionFunctions]] <code><nowiki>{{#sub:{{{purpose|}}}|0|50}}</nowiki></code> to shorten the "purpose" parameter value to 50 characters. This iscombination advancedof useformat of aand surrogate template inis combinationadvanced withuse, the format statement. Forfor more simple examples of surrogate template use, see the [[Controlling output volume#include contents related to templates|include]] parameter as related to included contents from templates, and for information about tables see also the <code>{{DPL|table}}</code> and <code>{{DPL|tablerow}}</code>for parametersother information about formatting in tables.
 
<pre>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.