« MEMOIRE D'AMOUR PERDU » : différence entre les versions

De Semantic MediaWiki - Sandbox

Aucun résumé des modifications
(and note about pain)
 
(2 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
{{Callout
|Since MediaWiki 1.34.0 one has to use the parser function <code><nowiki>#titleparts</nowiki></code> provided by the [[mediawikiwiki:Extension:ParserFunctions|"ParserFunctions" extension]] to be able to retrieve a plain input for the page title rather than a somehow encodes page title using just the <code><nowiki>{{PAGENAME}}</nowiki></code> variable as in earlier versions.
|error
}}
; Annotations
; Annotations
e.g. https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:Parcourir/:Fichier:25010906-5F133776770640296-5F68720735161417728-5Fn.jpg
e.g. https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:Parcourir/:Fichier:25010906-5F133776770640296-5F68720735161417728-5Fn.jpg
Ligne 5 : Ligne 10 :
<pre>
<pre>
{{#ask:
{{#ask:
  [[Has title::{{PAGENAME}}]]
  [[Has title::{{#titleparts: {{PAGENAME}} |1 }}]]
  |?Has note
  |?Has note
  |captionproperty=Has note
  |captionproperty=Has note
Ligne 16 : Ligne 21 :
; Result
; Result
{{#ask:
{{#ask:
  [[Has title::{{anchorencode:{{PAGENAMEE}}}}]]
  [[Has title::{{#titleparts: {{PAGENAME}} |1 }}]]
  |?Has note
  |?Has note
  |captionproperty=Has note
  |captionproperty=Has note
Ligne 23 : Ligne 28 :
  |heights=400
  |heights=400
}}
}}
; PAGENAME
# {{PAGENAME}}
# {{urlencode:{{PAGENAME}}}}
# {{urlencode:{{PAGENAME}}|QUERY}}
# {{urlencode:{{PAGENAME}}|WIKI}}
# {{urlencode:{{PAGENAME}}|PATH}}
# {{anchorencode:{{PAGENAME}}}}
; PAGENAMEE
# {{PAGENAMEE}}
# {{urlencode:{{PAGENAMEE}}}}
# {{urlencode:{{PAGENAMEE}}|QUERY}}
# {{urlencode:{{PAGENAMEE}}|WIKI}}
# {{urlencode:{{PAGENAMEE}}|PATH}}
# {{anchorencode:{{PAGENAMEE}}}}


[[Category:Gallery example]]
[[Category:Gallery example]]

Dernière version du 16 mai 2020 à 11:38

Since MediaWiki 1.34.0 one has to use the parser function #titleparts provided by the "ParserFunctions" extension to be able to retrieve a plain input for the page title rather than a somehow encodes page title using just the {{PAGENAME}} variable as in earlier versions.
Annotations

e.g. https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:Parcourir/:Fichier:25010906-5F133776770640296-5F68720735161417728-5Fn.jpg

Syntax
{{#ask:
 [[Has title::{{#titleparts: {{PAGENAME}} |1 }}]]
 |?Has note
 |captionproperty=Has note
 |format=gallery
 |widths=400
 |heights=400
}}
Result
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.