« Module:Version imprimable » : différence entre les versions

Contenu supprimé Contenu ajouté
Aucun résumé des modifications
+ homepage
Ligne 190 :
local lines_ = mw.text.split(text, "\n")
local previousChapter = ""
local found = false
local fullPageName
local subpageName
local rawFullPageName
local homepage = false
local found = false
 
if (currentPageName == BookName) then
if debug then table.insert(footer, theTemplateLeft" homepage\n") end
homepage = true
end
 
for i, v in ipairs(lines_) do
Ligne 217 ⟶ 223 :
if debug then table.insert(footer, " cut subpage: " .. subpageName .. "\n") end
if (subpageName ~= nil and subpageName ~= "") then
if found == true or homepage == true then
if debug then table.insert(footer, "<font color=red>Previous & next chapter insertion</font>\n") end
 
if previousChapter == "" then
if theTemplateLeft, nbhomepage == mw.ustring.gsub(templateLeft, "printf", BookName .. "|" ..false TOC)then
else if previousChapter == "" then
theTemplateLeft, nb = mw.ustring.gsub(templateLeft, "printf", BookName .. sep .. previousChapter .. "|" .. previousChapterTOC)
if previousChapter == "" thenelse
theTemplateLeft, nb = mw.ustring.gsub(templateLeft, "printf", BookName .. sep .. previousChapter .. "|" .. previousChapter)
end
table.insert(footer, theTemplateLeft)
end
 
table.insert(footer, theTemplateLeft)
theTemplateRight, nb = mw.ustring.gsub(templateRight, "printf", BookName .. sep .. subpageName .. "|" .. subpageName)
table.insert(footer, theTemplateRight)