HandlerPageView: Set 'pagetitle' dynamic variable

This commit is contained in:
Albert S. 2022-08-17 22:06:09 +02:00
부모 0cad11004f
커밋 51b259f385

파일 보기

@ -183,13 +183,15 @@ Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename,
return errorResponse("Error", "Could not get first revision for page, which is odd. Solar flares?");
}
std::string customtitle = parser.extractCommand("pagetitle", revision->content);
dynamicVarsMap["createdon"] = utils::toISODate(firstRevision.value().timestamp);
dynamicVarsMap["pagetitle"] = customtitle;
std::string resolvedContent = parser.parseDynamics(revision->content, dynamicParseCallback);
indexcontent = createIndexContent(parser, resolvedContent);
parsedcontent = parser.parse(pageDao, *this->urlProvider, resolvedContent);
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);