« Module:Comic books/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]. Category:Semantic Scr... »)
 
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 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'''.


[[Category:Semantic Scribunto example]]
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:
# 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>

Version du 15 décembre 2016 à 15:08

This is an example module to show some capabilities of Extension:Semantic Scribunto. This one especially shows how to use mw.smw.set.

After getting the arguments passed to the invoking template in main( frame ) (utilizing Module:Arguments), the module body is processed (represented by function _main( args )). What this does is:

  1. filter known and existant argument data into local data table
  2. sets some (one) default(s)
  3. checks for existance of mandatory arguments
  4. converts all list fields into a table
  5. saves the semantic data
  6. builds a nice infobox (utilizing Module:Infobox)
  7. places the page in the appropriate category


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