HandlerPageView: Add [cmd:pagetitle] to set custom per-page titles
这个提交包含在:
@@ -167,6 +167,7 @@ Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename,
|
||||
}
|
||||
}
|
||||
std::string revisionstr = std::to_string(revision->revision);
|
||||
std::string customtitle = parser.extractCommand("pagetitle", revision->content);
|
||||
page.setVar("content", parsedcontent);
|
||||
page.setVar("index", indexcontent);
|
||||
page.setVar("editedby", revision->author);
|
||||
@@ -174,6 +175,10 @@ Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename,
|
||||
page.setVar("historyurl", this->urlProvider->pageHistory(pagename));
|
||||
page.setVar("revision", revisionstr);
|
||||
setPageVars(page, pagename);
|
||||
if(!customtitle.empty())
|
||||
{
|
||||
page.setVar("title", createPageTitle(customtitle));
|
||||
}
|
||||
std::string body = page.render();
|
||||
if(revisionid == 0 && !this->userSession->loggedIn)
|
||||
{
|
||||
|
在新工单中引用
屏蔽一个用户