aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordvs12025-01-15 15:23:29 +1000
committerdvs12025-01-15 15:23:29 +1000
commit11cebe734d396344f290d155f71886eaf6c7901b (patch)
tree37d6e073e605e1db97a861a9f4c533e210fd8fd3
parentShould be correct titles everywhere now. (diff)
downloadnotYetAnotherWiki-11cebe734d396344f290d155f71886eaf6c7901b.zip
notYetAnotherWiki-11cebe734d396344f290d155f71886eaf6c7901b.tar.gz
notYetAnotherWiki-11cebe734d396344f290d155f71886eaf6c7901b.tar.bz2
notYetAnotherWiki-11cebe734d396344f290d155f71886eaf6c7901b.tar.xz
Sort the header links.
-rwxr-xr-xnotYetAnotherWiki.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index 9332f9e..55953cd 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -221,15 +221,18 @@ for name, file in pairs(Files) do
221 221
222 -- Figure out this pages header links. 222 -- Figure out this pages header links.
223 metadata.header = '' 223 metadata.header = ''
224
225
226 subs = {}
224 for i, f in pairs(Subs[path].subs) do 227 for i, f in pairs(Subs[path].subs) do
228 table.insert(subs, f)
229 end
230 table.sort(subs)
231 for i, f in ipairs(subs) do
225 local pth = path 232 local pth = path
226 if '' ~= path then pth = path .. '/' end 233 if '' ~= path then pth = path .. '/' end
227 local fl = whichPage(pth .. f) 234 local fl = whichPage(pth .. f)
228-- if '' == fl then 235 metadata.header = metadata.header .. '<a href="' .. f .. '/' .. fl .. '">' .. f .. '</a> &nbsp; '
229-- metadata.header = metadata.header .. f .. ' &nbsp; '
230-- else
231 metadata.header = metadata.header .. '<a href="' .. f .. '/' .. fl .. '">' .. f .. '</a> &nbsp; '
232-- end
233 end 236 end
234 237
235 -- Figure out this pages menu links. 238 -- Figure out this pages menu links.