Tests divers : Différence entre versions

De M@gistère
Sauter à la navigation Sauter à la recherche
(6 révisions intermédiaires par un autre utilisateur non affichées)
Ligne 1 : Ligne 1 :
 +
[[Catégorie:Amodifier]]
  
 +
* {{#show: Tests|?Catégorie }}
  
 
== ParserFunctions et Semantic ==
 
== ParserFunctions et Semantic ==
Ligne 5 : Ligne 7 :
 
Test de property :
 
Test de property :
  
* Définition de propriété : Version : [[versionmag::3.0.3]] -- Memeversion : [[memeversionmag::3.0.3]] -- Autreversion [[autreversionmag::3.0.1]]
+
* Définition de propriété : Versionmag : [[versionmag::3.0.3]]  
* Affichage de propriétés : {{#show: Tests|?versionmag }} et  {{#show: Tests|?memeversionmag }} et  {{#show: Tests|?autreversionmag }}
 
  
 +
* 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 }}
 
* ifeq Toto = Toto : {{#ifeq: Toto | Toto | YES | NO }}
 
* ifeq Toto = Lala : {{#ifeq: Toto | Lala | YES | NO }}
 
* ifeq 99 = 99 : {{#ifeq: 99 | 99 | YES | NO }}
 
* ifeq 98 = 99 : {{#ifeq: 98 | 99 | YES | NO }}
 
* version = memeversion : {{#ifeq: {{#show: Tests|?versionmag }} | {{#show: Tests|?memeversionmag}} | YES | NO }}
 
* version = autreversion : {{#ifeq: {{#show: Tests|?versionmag }} | {{#show: Tests|?autreversionmag}} | 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 :
 
* {{#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 54 : 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