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

De Semantic MediaWiki - Sandbox

(add)
(and note about pain)
 
(18 versions intermédiaires par 2 utilisateurs 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
e.g. https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:Parcourir/:Fichier:25010906-5F133776770640296-5F68720735161417728-5Fn.jpg
; Syntax
<pre>
{{#ask:
[[Has title::{{#titleparts: {{PAGENAME}} |1 }}]]
|?Has note
|captionproperty=Has note
|format=gallery
|widths=400
|heights=400
}}
</pre>
; Result
{{#ask:
{{#ask:
  [[Has title::{{PAGENAME}}]]
  [[Has title::{{#titleparts: {{PAGENAME}} |1 }}]]
|?Has image
  |?Has note
  |?Has note
  |captionproperty=Has Note
  |captionproperty=Has note
|imageproperty=Has image
  |format=gallery
  |format=gallery
|widths=400
|heights=400
}}
}}
[[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.