General usage and invocation syntax: Difference between revisions

Content added Content deleted
imported>FrozenPlum
m (putting things back where they were before un-privating again)
imported>FrozenPlum
m (TOC to the top where it belongs)
Line 1: Line 1:
{{note|This page is in development, some content may be incorrect, outdated or otherwise misleading.|warn}}
{{note|This page is in development, some content may be incorrect, outdated or otherwise misleading.|warn}}
{{DPL manual|section=General usage and invocation syntax}}
{{DPL manual|section=General usage and invocation syntax}}
{{tocright}}

'''DynamicPageList3 (DPL3)''' can be used as a '''parser extension''' (<small><code><nowiki><DPL> .... </DPL></nowiki></code></small>) or as a '''parser function''' (<small><code><nowiki>{{#dpl: .... }}</nowiki></code></small>). There is no general rule which one is better. If in doubt, you may want to use the parser function syntax, as it is more powerful.
'''DynamicPageList3 (DPL3)''' can be used as a '''parser extension''' (<small><code><nowiki><DPL> .... </DPL></nowiki></code></small>) or as a '''parser function''' (<small><code><nowiki>{{#dpl: .... }}</nowiki></code></small>). There is no general rule which one is better. If in doubt, you may want to use the parser function syntax, as it is more powerful.


Line 10: Line 10:
:* [[Page 2]]
:* [[Page 2]]
:* [[Another Page]]
:* [[Another Page]]

{{tocright}}
==Parser extension method==
==Parser extension method==
The following example would probably be used directly on an article page, but could also be included as part of a template. Parser extensions define a specific tag (in this case <code><nowiki><DPL></nowiki></code>) and a corresponding end tag (<code><nowiki></DPL></nowiki></code>). '''The text between these tags is handed over to the extension module ''just as it is''.'''
The following example would probably be used directly on an article page, but could also be included as part of a template. Parser extensions define a specific tag (in this case <code><nowiki><DPL></nowiki></code>) and a corresponding end tag (<code><nowiki></DPL></nowiki></code>). '''The text between these tags is handed over to the extension module ''just as it is''.'''