Examples/Parameter: linksto (example 1): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(parceling out examples to their own pages, with working sandbox link that preloads them to user sandbox page)
 
imported>FrozenPlum
m (FrozenPlum moved page Criteria for page selection/Parameter: linksto (example 1) to Examples/Parameter: linksto (example 1): Simplifying how things are structured)
 
(5 intermediate revisions by 2 users not shown)
Line 6: Line 6:
==Example==
==Example==


This list will output pages that are in [[:Category:Number examples]] that link to other pages with <code>Tw</code> in the name (e.g., pages that link to page '''[[Two]]''') that are in the ''Main'' namespace (by default). To make the comparison case-insensitive, the parameter <code>{{DPL|ignorecase}}</code> can be used.
This will select pages in [[:Category:Number examples]] that link to other pages ''starting'' with "Tw" in the name (e.g., pages that link to page '''[[Two]]''', but not to '''[[ThirtyTwo]]''') that are in the ''Main'' namespace (by default). To make the comparison case-insensitive, the parameter <code>{{DPL|ignorecase}}</code> can be used.


<table class="wikitable" style="vertical-align:top;">
<tr>
<td>'''Parser extension (tag)'''
<pre>
<dpl>
category = Number examples
linksto = Tw%
</dpl>
</pre>
</td><td>'''Parser function'''
<pre>
<pre>
{{#dpl:
{{#dpl:
Line 24: Line 14:
}}
}}
</pre>
</pre>

</td></tr>
==Result==
<tr><td colspan="2">

'''Result:'''<br>
Parser function method<br>
{{#dpl:
{{#dpl:
|category = Number examples
|category = Number examples
|linksto = Tw%
|linksto = Tw%
}}
}}
</td></tr>
</table>

<noinclude>
<noinclude>
[[Category:Select by link-related criteria‎]]
[[Category:Uses category parameter]]
[[Category:Uses category parameter]]
[[Category:Uses linksto parameter]]
[[Category:Uses linksto parameter]]

Latest revision as of 22:44, 31 March 2023

Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

This will select pages in Category:Number examples that link to other pages starting with "Tw" in the name (e.g., pages that link to page Two, but not to ThirtyTwo) that are in the Main namespace (by default). To make the comparison case-insensitive, the parameter ignorecase can be used.

{{#dpl:
|category = Number examples
|linksto  = Tw%
}}

Result

Parser function method
{{#dpl: |category = Number examples |linksto = Tw% }}