Examples/Parameter: linksto (example 1): Difference between revisions
< Examples
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 |
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
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%
}}