Anonymous user
General usage and invocation syntax: Difference between revisions
m
add my changes from testing site
imported>FrozenPlum m (Make it clear here that the manual is being switched to being mostly in parser function method, since one of the complaints of the manual prior was that people didn’t know how to convert things easily because it was mostly done in parser extension method, when many more use cases need the parser function method. Also, I don’t want to have to explain or remind every example or page that the block quotes are not part of the output.) |
imported>FrozenPlum m (add my changes from testing site) |
||
Line 1:
{{Purgenote}}
{{DPL manual|section=General usage and invocation syntax}}
{{tocright}}
Line 99:
==Built-in variables==
Within a DPL statement, you can use some variables which are implicitly set by DPL. Some {{DPL|format|variables}}
{{#lst:Controlling output format|formatvariables}}
{| class="wikitable"
! Variable
! Description
|-
|%SECTION%
|The page name and its included section anchor <code>''Page Name#SectionName''</code>. Corresponds to <code>include=''#SectionName''</code> (when a page section is included by name).
{{note|At this time, it appears that %SECTION% can only be used in <code>{{DPL|secseparators}}</code>.}}
|}
==URL parameters==
Line 243 ⟶ 248:
Calling <code><nowiki>http://mywebsite/mywiki/index.php?title=MyPopularArticles</nowiki></code> will give you the first 100 articles in the category. Adding <code>&DPL_offset=100</code> will give you the next one hundred articles. This mechanism can be used to create a generic page scroll feature—provided you can access the value of <code>DPL_offset</code> also in other templates outside DPL. And this is where the <code>{{DPL|execandexit}}</code> command comes in: it stores the URL parameters in a variable which can be accessed via <code>{{DPL|#dplvar}}</code>.
==References==
<references>
<ref name=hitcounters>This feature was completely removed in MediaWiki 1.25, following a request for comment. See [[Hit counters removed]].</ref>
</references>
[[Category:Manual]]
|