« Introduction au Lua/Scribunto objet Frame » : différence entre les versions

Contenu supprimé Contenu ajouté
m Lydie Noria a déplacé la page Projet:Laboratoire/Lua/Scribunto objet Frame vers Introduction au Lua/Scribunto objet Frame sans laisser de redirection : retour vers l'espace principal
mise à jour
Ligne 61 :
--[[Cet exemple passe des variables littérales avant transclusion d'un modèle. ]]--
result = "'''frame:expandTemplate():'''"
result = result .. frame:expandTemplate({title = 'Sidebar', args = {title ='[[Projet:Laboratoire/Introduction au Lua/Scribunto objet Frame | Le test fonctionne, retour à la leçon!]]', navbar = 'none', topimage = '[[Image:Lua-logo-nolabel.svg | 100px | link=Projet:Laboratoire/Lua]]'}}) .. '\n'
return result
end
Ligne 68 :
 
== Tester votre nouveau script ==
# Rendez-vous sur "votre page de test" ou cette page de [[Discussion Projet:Laboratoire/Introduction au Lua/Scribunto objet Frame|discussion]].
# Ajouter le code suivant et enregistrer la page:
<blockquote><pre>
Ligne 86 :
: ---Context arguments---
: frame:getTitle() is: '''Module:Sandbox'''
: frame:getParent() then frame:getTitle() gives: '''Discussion Projet:Laboratoire/Introduction au Lua/Scribunto objet Frame/Scribunto objet Frame
'''
; ipairs(frame.args)
Ligne 101 :
 
;frame<nowiki>:</nowiki>expandTemplate():
{{Sidebar|title =[[Projet:Laboratoire/Introduction au Lua/Scribunto objet Frame | Le test fonctionne!]]| navbar = none| topimage = [[Image:Lua-logo-nolabel.svg | 100px | link=Projet:Laboratoire/Introduction au Lua]]}}