HandlerPageView: Set 'pagetitle' dynamic variable

Tento commit je obsažen v:
Albert S. 2022-08-17 22:06:09 +02:00
rodič 0cad11004f
revize 51b259f385

Zobrazit soubor

@ -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);