« Module:Person/doc » : différence entre les versions

De Semantic MediaWiki - Sandbox
(Page créée avec « This is an example module to show some capabilities of [https://www.mediawiki.org/wiki/Extension:Semantic_Scribunto Extension:Semantic Scribunto]. This one especially show... »)
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
This is an example module to show some capabilities of [https://www.mediawiki.org/wiki/Extension:Semantic_Scribunto Extension:Semantic Scribunto]. This one especially shows how to use '''mw.smw.set'''.
It uses the class [[Module:SSC base]] to process its arguments, store them semantically and display an infobox.


After getting the arguments passed to the invoking template in <code>main( frame )</code> (utilizing [[Module:Arguments]]), the module body is processed (represented by <code>function _main( args )</code>). What this does is:
This module stores its configuration on [[Module:{{BASEPAGENAME}}/config]].
# filter known and existant argument data into local data table
# sets some (one) default(s)
# checks for existance of mandatory arguments
# converts all list fields into a table
# saves the semantic data
# builds a nice infobox (utilizing [[Module:Infobox]])
# places the page in the appropriate category


<includeonly>[[Category:Semantic Scribunto example]]</includeonly>
<includeonly>[[Category:Semantic Scribunto example]]</includeonly>

Version du 19 décembre 2016 à 23:39

It uses the class Module:SSC base to process its arguments, store them semantically and display an infobox.

This module stores its configuration on Module:Person/config.


Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.