Différences entre les versions de « MEMOIRE D'AMOUR PERDU »

De Semantic MediaWiki - Sandbox

(chg)
(and note about pain)
 
(11 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
 
; 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
 
  |format=gallery
 
  |format=gallery
 
  |widths=400
 
  |widths=400
Ligne 16 : Ligne 21 :
 
; Result
 
; Result
 
{{#ask:
 
{{#ask:
  [[Has title::{{PAGENAME}}]]
+
  [[Has title::{{#titleparts: {{PAGENAME}} |1 }}]]
 
  |?Has note
 
  |?Has note
  |captionproperty=Has Note
+
  |captionproperty=Has note
 
  |format=gallery
 
  |format=gallery
 
  |widths=400
 
  |widths=400

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.