Related to article (example): Difference between revisions
Content added Content deleted
No edit summary |
imported>FrozenPlum (remove tempnote as openreferences was fixed in v3.5.0, and fix examples) |
||
(12 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{DPL |
{{DPL manual|section=Examples|subsection=Related to article}} |
||
=List |
==List pages linked from article== |
||
<pre> |
|||
The following example |
|||
⚫ | |||
⚫ | |||
<pre><nowiki>{{#dpl: |
|||
format=,[[%PAGE%]],<br/> |
|||
|openreferences=yes |
|openreferences=yes |
||
|ordermethod=none |
|ordermethod=none |
||
|count=5 |
|||
⚫ | |||
}} |
|||
}}</nowiki></pre> |
|||
</pre> |
|||
Produces a list of pages linked from the [[Apple]] article, limited to 5 results, including links to non-existing pages (if any) due to the use of <code>openreferences=yes</code>. |
|||
'''Result:'''<br> |
|||
Would produce a list of articles that link to DPL:Manual |
|||
⚫ | |||
⚫ | |||
⚫ | |||
format=,[[%PAGE%]],<br/> |
|||
|openreferences=yes |
|openreferences=yes |
||
|ordermethod=none |
|ordermethod=none |
||
|count=5 |
|||
⚫ | |||
}} |
}} |
||
=List templates |
==List templates used by an article== |
||
<pre> |
|||
The following example |
|||
⚫ | |||
|usedby=Apple |
|||
|count=5 |
|||
}} |
|||
</pre> |
|||
⚫ | |||
'''Result:'''<br> |
|||
<pre><nowiki>{{#dpl: |
|||
{{#dpl: |
|||
format=,[[%PAGE%]],<br/> |
|||
|usedby= |
|usedby=Apple |
||
|count=5 |
|||
}}</nowiki></pre> |
|||
}} |
|||
== == |
|||
⚫ | |||
Produces a list of articles whose title contains the word "Main" and includes the categories for each page. |
|||
<pre> |
|||
=IGNORE - DEBUG TESTING BY DEVELOPERS. THIS PAGE HAS AN ISSUE.= |
|||
{{#dpl: |
|||
⚫ | |||
|addcategories=true |
|||
}} |
|||
</pre> |
|||
'''Result:'''<br> |
|||
⚫ | |||
{{#dpl: |
|||
⚫ | |||
|titlematch=%Main% |
|||
|addcategories=true |
|addcategories=true |
||
|count=5 |
|||
|format=,²{#replace:Category:%CATNAMES%¦²{comma}²¦<br/>Category:}²,<br/> |
|||
}} |
}} |
||
[[Category:Miscellaneous examples]] |
|||
⚫ | |||
mode=userformat |
|||
|format=,[[%PAGE%]],<br/> |
|||
|escapelinks=true |
|||
|imagecontainer=DPL:Manual |
|||
}}</code> |
Latest revision as of 22:38, 16 January 2023
|
Manual | Examples | Related to article |
List pages linked from article
{{#dpl: |linksfrom=Apple |openreferences=yes |ordermethod=none |count=5 }}
Produces a list of pages linked from the Apple article, limited to 5 results, including links to non-existing pages (if any) due to the use of openreferences=yes
.
Result:
{{#dpl:
|linksfrom=Apple
|openreferences=yes
|ordermethod=none
|count=5
}}
List templates used by an article
{{#dpl: |usedby=Apple |count=5 }}
Produces a list of templates that are used by the Apple article.
Result:
{{#dpl:
|usedby=Apple
|count=5
}}
Produces a list of articles whose title contains the word "Main" and includes the categories for each page.
{{#dpl: |titlematch=%Main% |addcategories=true }}
Result:
{{#dpl:
|titlematch=%Main%
|addcategories=true
|count=5
}}