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={};localMODULE={};MODULE.CODE="[[File:Noun Project coding icon 2752876.svg|40x40px|link=%s]]";MODULE.ICON="[[File:LUA layout for Wikibooks.png|200px|right|frameless|link=Module:Layout]]"MODULE.EDIT="[[File:JS Icon Edit.svg|40x40px|link=%s]]";functioncontent.main(call)localtext,pattern=call.include("text","pattern");localresult={};localtitle=mw.title.getCurrentTitle();localdescription="https://"..string.lower(call.language)..".wikibooks.org/w/index.php?title="..title.fullText.."/doc&action=edit";description=string.format(MODULE.EDIT,description).." ";localcategorylink=call.message.MODULE.CATEGORY;if(title.subpageText=="doc")thendescription="https://"..string.lower(call.language)..".wikibooks.org/w/index.php?title=Module:"..title.baseText;description=string.format(MODULE.CODE,description).." ";categorylink=call.message.MODULE.DOCUMENTATION;endiftitle.rootText=="Layout"thendescription=description..string.format(call.message.MODULE.DESCRIPTION,categorylink,call.version);elseifcall.descriptionthendescription=description..call.description.."\n";elsedescription=description..call.message.MODULE.ADD_DESCRIPTION;endend-- If no content is provided set it to an empty stringlocalelaboration="";if(text.valid(call.unnamed[1]))thenelaboration=call.unnamed[1];end-- Determine the categorylocalpage_title=title.subpageText;localpage_base=pattern.last_segment_of_url(title.baseText);if(page_title=="doc")thenlocalnewtitle=title.basePageTitle;page_title=newtitle.subpageText;page_base=pattern.last_segment_of_url(newtitle.baseText);end-- Place only the main module and it's documentationpage in the correct category.result.category="";if(nottitle.isSubpage)thenresult.category="[["..call.message.MODULE.CATEGORY.."]]";elseif(title.subpageText=="doc"andnottitle.basePageTitle.isSubpage)thenresult.category="[["..call.message.MODULE.DOCUMENTATION.."]]";endresult.description=description;result.elaboration=elaboration;result.MODULE=MODULE;call.content=result;returncall;endreturncontent;