Tests divers : Différence entre versions

De M@gistère
Sauter à la navigation Sauter à la recherche
(24 révisions intermédiaires par un autre utilisateur non affichées)
Ligne 1 : Ligne 1 :
 +
[[Catégorie:Amodifier]]
  
 
+
* {{#show: Tests|?Catégorie }}
== test ==
 
 
 
* [[prop::Toto]]
 
* {{#ifeq: {{#show:Tests|?prop}} | Toto | YES | NO }} (should be YES)
 
* {{#ifeq: {{#show:Tests|?prop}} | Lala | YES | NO }} (should be NO)
 
 
 
* [[int::42]]
 
* {{#if: {{#show:Tests|?int}}==42 | YES | NO }} (should be YES)
 
* {{#if: {{#show:Tests|?int}}==99 | YES | NO }} (should be NO)
 
  
 
== ParserFunctions et Semantic ==
 
== ParserFunctions et Semantic ==
Ligne 15 : Ligne 7 :
 
Test de property :
 
Test de property :
  
* Définition de propriété : Version : [[versionmag::3.0.3]]
+
* Définition de propriété : Versionmag : [[versionmag::3.0.3]]  
* Affichage de propriété : {{#show: Tests|?versionmag }}
 
  
 +
* page [[Version301]] ({{#show: Version301|?version}}) : {{#ifeq: {{#show: Tests|?versionmag }} | {{#show: Version301|?version}} | ✔️ }}
 +
* page [[Version303]] ({{#show: Version303|?version}}) : {{#ifeq: {{#show: Tests|?versionmag }} | {{#show: Version303|?version}} | ✔️ }}
  
 
* https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##if
 
* https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##if
 
* https://www.semantic-mediawiki.org/wiki/Help:Inline_queries#Parser_function_.23show
 
* https://www.semantic-mediawiki.org/wiki/Help:Inline_queries#Parser_function_.23show
 
Test qui fonctionne :
 
* {{#ifeq: string 1 | string 2 | value if equal | value if unequal }}
 
* Toto = Toto : {{#ifeq: Toto | Toto | YES | NO }}
 
* Toto = Lala : {{#ifeq: Toto | Lala | YES | NO }}
 
 
Test qui ne fonctionne pas :
 
* mavariable : [[mavariable::Toto]]
 
* {{#show:Tests|?mavariable}} = Toto : {{#ifeq: {{#show:Tests|?mavariable}} | Toto | YES | NO }}
 
* {{#show:Tests|?mavariable}} = Lala : {{#ifeq: {{#show:Tests|?mavariable}} | Lala | YES | NO }}
 
 
Test qui ne fonctionne pas :
 
* myvariable = [[myvariable::42]]
 
* {{#show:Tests|?myvariable}} = 42 : {{#if: {{#show:Tests|?myvariable}}==42 | YES | NO }}
 
* {{#show:Tests|?myvariable}} = 99 : {{#if: {{#show:Tests|?myvariable}}==99 | YES | NO }}
 
 
Test qui ne fonctionne pas :
 
* {{#show: Tests|?versionmag }} = 3.0.1 : {{#ifeq: {{#show: Tests|?versionmag }} | "3.0.1" | YES | NO }}
 
* {{#show: Tests|?versionmag }} = 3.0.3 : {{#ifeq: {{#show: Tests|?versionmag }} | "3.0.3" | YES | NO }}
 
  
 
== Fontawesome ==
 
== Fontawesome ==
Ligne 63 : Ligne 37 :
  
 
les modifications du code de ces blocs custom sont à effectuer sur : [[Modèle:Note]], [[Modèle:Important]], etc.
 
les modifications du code de ces blocs custom sont à effectuer sur : [[Modèle:Note]], [[Modèle:Important]], etc.
 +
 +
[[Modèle:DisplayInfos]]

Version du 7 novembre 2019 à 15:55


ParserFunctions et Semantic

Test de property :

  • Définition de propriété : Versionmag : 3.0.3

Fontawesome

  • wikipedia-w
  • 500px
  • bullseye
  • une icône fontawesome méthode html

Blocs custom

    Pour obtenir ce bloc, écrire : {{Info|texte}}

    Pour obtenir ce bloc, écrire : {{Warning|texte}}

    Pour obtenir ce bloc, écrire : {{Error|texte}}

Présentation

Pour obtenir ce bloc, écrire : {{Présentation|Texte}}

Important

Pour obtenir ce bloc, écrire : {{Important|Texte}}

Pour obtenir ce bloc, écrire : {{Note|Texte}}

les modifications du code de ces blocs custom sont à effectuer sur : Modèle:Note, Modèle:Important, etc.

Modèle:DisplayInfos