summaryrefslogtreecommitdiffstats
path: root/scripts/page.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/page.lua')
-rw-r--r--scripts/page.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/page.lua b/scripts/page.lua
index 48eef6e..33982ba 100644
--- a/scripts/page.lua
+++ b/scripts/page.lua
@@ -149,9 +149,12 @@ function generate_related(meta)
149 149
150 if not meta.prev and not meta.next then return nil end 150 if not meta.prev and not meta.next then return nil end
151 151
152 local layout = meta.parent.list_layout 152 local layout
153 local layout_id = utils.stringify(layout.id) 153 local layout_id = utils.stringify(meta.parent.list_layout.id)
154 if layout_id ~= "grid-2" and layout_id ~= "gallery-2" then 154
155 if layout_id == "gallery-2" or layout_id == "gallery-3" then
156 layout = common.prep_layout("gallery-2")
157 else
155 layout = common.prep_layout("grid-2") 158 layout = common.prep_layout("grid-2")
156 end 159 end
157 160