Deze module is nog in ontwikkeling (versie 0.0) en wordt getest.
De Module:Layout is bedoeld om snel, consistent en uitgebreid een pagina op te maken.
Er is een op de module afgestemde handleiding over deze onderwijswiki beschikbaar.
localcontent={}functioncontent.main(call)localarray,extract,text=call.include("array","extract","text");-- Extend the call variable with messages that are specific to the type of the objects book includescall.message.PROGRESS=call.include(call.language_path.."/Progress");call.content={};call.content.wikipedia=false;call.content.wikijunior=false;ifcall.referencethenifarray.search(call.reference,"wikipedia")thencall.message.WIKIPEDIA=call.include(call.language_path.."/Wikipedia");call.content.wikipedia=true;endifarray.search(call.reference,"wikijunior")thencall.message.WIKIJUNIOR=call.include(call.language_path.."/Wikijunior");call.content.wikijunior=true;endif(call.title==nilortype(call.title)~='string'orcall.title=="")thencall.title=call.caller;endendcall.content.chapter={}localtext_strings={}fori,sinipairs(call.unnamed)doifsands~=""thentable.insert(text_strings,text.trim(s))endendcall.content.text=text_stringscall.content.series={};call.content.series.image="";call.content.series.link="";call.content.series.book={};ifcall.collection[1]thencall.content.series.link=text.trim(call.collection[1]);localwiki_series=mw.title.new(call.content.series.link);call.content.series.link=mw.ustring.format('[[%s|%s]]',call.content.series.link,call.content.series.link);ifwiki_seriesthenlocalsource_parameters=extract.parameter(wiki_series:getContent(),call.message.TEMPLATENAME,call.message.PARAM.SOURCE,call);ifsource_parametersandsource_parameters[1]and#source_parameters[1]>0thencall.content.series.image=mw.ustring.format('[[image:%s|30px]] ',source_parameters[1])endlocaltitle_parameters=extract.parameter(wiki_series:getContent(),call.message.TEMPLATENAME,call.message.PARAM.TITLE,call);iftitle_parametersandtitle_parameters[1]thencall.content.series.link=mw.ustring.format('[[%s|%s]]',text.trim(call.collection[1]),title_parameters[1]);endlocalpart_parameters=extract.parameter(wiki_series:getContent(),call.message.TEMPLATENAME,call.message.PARAM.PART,call);ifpart_parametersandpart_parameters[1]thenlocalparts=text.split(part_parameters[1],true);fori,bookinipairs(parts)doifbookandbook~=""thenlocalunformatted_book=book:gsub("­","")table.insert(call.content.series.book,extract.book_progress(unformatted_book,call));endendendendendcall.content.max_number_of_chapter_title_lines=0call.content.max_number_of_chapter_headings=0fori,chapterinipairs(call.part)doifchapterandchapter~=""thenchapter=mw.text.trim(chapter)localchapter_title_lines=select(2,chapter:gsub('­',''))+1ifchapter_title_lines>call.content.max_number_of_chapter_title_linesthencall.content.max_number_of_chapter_title_lines=chapter_title_linesendlocalformatted_chapter=chapter:gsub(" "," ")formatted_chapter=formatted_chapter:gsub("­","<br>")chapter=chapter:gsub("­","")localnew_chapter={}new_chapter.name=chapternew_chapter.number=inew_chapter.caption=call.message.OBJECT.CHAPTER;new_chapter.subelements={}localcurrentPageTitle=mw.title.getCurrentTitle().prefixedText;localchapter_text=mw.ustring.format('[[%s|%s]]',chapter,formatted_chapter)localwiki_chapter=nilifcurrentPageTitlethenlocalpage_title=currentPageTitlewiki_chapter=mw.title.new(page_title.."/"..chapter)ifwiki_chapterthenchapter_text=mw.ustring.format('[[%s|%s]]',wiki_chapter.prefixedText,formatted_chapter)localextract=call.include("extract");new_chapter.subelements=extract.heading(wiki_chapter:getContent(),call);localaantal_headings=#new_chapter.subelementsifaantal_headings>call.content.max_number_of_chapter_headingsthencall.content.max_number_of_chapter_headings=aantal_headingsendendendnew_chapter.text=chapter_text;new_chapter.button=call.message.BUTTON.READ;ifwiki_chapterthennew_chapter.button=mw.ustring.format('[[%s|%s]]',wiki_chapter.prefixedText,new_chapter.button);endtable.insert(call.content.chapter,new_chapter);endendreturncall;endreturncontent;