Différences entre les versions de « MEMOIRE D'AMOUR PERDU »
De Semantic MediaWiki - Sandbox
(chg) |
(and note about pain) |
||
(13 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 note | |?Has note | ||
− | |captionproperty=Has | + | |captionproperty=Has note |
|format=gallery | |format=gallery | ||
|widths=400 | |widths=400 | ||
|heights=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
- Syntax
{{#ask: [[Has title::{{#titleparts: {{PAGENAME}} |1 }}]] |?Has note |captionproperty=Has note |format=gallery |widths=400 |heights=400 }}
- Result