fun tpl_article: TplArticle do
var article = new TplArticle
article.body = content
- article.breadcrumbs = new TplBreadcrumbs(self)
+ if wiki.config.auto_breadcrumbs then
+ article.breadcrumbs = new TplBreadcrumbs(self)
+ end
article.sidebar = tpl_sidebar
article.sidebar_pos = wiki.config.sidebar
return article
# Sidebar for this page.
var tpl_sidebar: TplSidebar is lazy do
var res = new TplSidebar
- res.blocks.add tpl_summary
+ if wiki.config.auto_summary then
+ res.blocks.add tpl_summary
+ end
res.blocks.add_all sidebar.blocks
return res
end
if tpl.has_macro("GEN_TIME") then
tpl.replace("GEN_TIME", time.to_s)
end
+ if tpl.has_macro("LAST_CHANGES") then
+ var url = "{wiki.config.last_changes}{src_path or else ""}"
+ tpl.replace("LAST_CHANGES", url)
+ end
+ if tpl.has_macro("EDIT") then
+ var url = "{wiki.config.edit}{src_path or else ""}"
+ tpl.replace("EDIT", url)
+ end
return tpl
end
end