Anonymous user
Examples/Parameter: showcurid (example 1): Difference between revisions
Examples/Parameter: showcurid (example 1) (view source)
Revision as of 23:04, 16 January 2023
, 1 year agoMinor adjustments to text
imported>FrozenPlum No edit summary |
imported>FrozenPlum m (Minor adjustments to text) |
||
Line 5:
-->__NOTOC__
==Example==
This
▲This will output a list of pages belonging to [[:Category:Dessert examples]]; the hyperlinks to these pages will look normal (displaying their page name), but will use an additional MediaWiki parameter named '[[mw:Manual:Parameters to index.php#Page revision or version|curid]]' at the end of the URL, which contains the numeric ID of the page.
{{tempnote}}▼
'''Notes:'''▼
* A <code>format</code> statement could be used to achieve similar output: <code>|format = ,\n* <span class="plainlinks">[²{fullurl:%PAGE%¦curid=%PAGEID%}² %PAGE%]</span></code> (observed in an [[Controlling output volume/Parameter: showcurid (example 1)#Example 2|alternate example]]).▼
* Using this type of link may be somewhat faster than using the title only. This kind of link is useful for some web spiders (e.g., some search engine spiders may need a unique ID within the pagelink) and it works even if the title has moved.▼
<pre>
Line 20 ⟶ 13:
}}
</pre>
▲'''Notes:'''
▲* A <code>format</code> statement could also be used to achieve
* <code>showcurid=true</code> cannot be used together with <code>openreferences=true</code>.
▲* Using this type of link may be somewhat faster than using the title only. This kind of link is useful for some web spiders (e.g., some search engine spiders may need a unique ID within the pagelink) and it works even if the title has moved.
▲{{tempnote}}
==Result==
{{#dpl:
|category = Dessert examples
Line 29 ⟶ 27:
==Example 2==
This selects pages
<pre>
Line 43 ⟶ 41:
|format = ,\n* <span class="plainlinks">[²{fullurl:%PAGE%¦curid=%PAGEID%}² %PAGE%]</span>
}}
<noinclude>
[[Category:Adding meta data to the output]]
|