Revert "dynamic: DynamicContentPostList: Link using UrlProvider::pageByTitle()"

This reverts commit 9b35e43161.
This commit is contained in:
Albert S. 2022-03-29 22:45:17 +02:00
parent 9b35e43161
commit 91951abe9c

View File

@ -25,13 +25,12 @@ std::string DynamicContentPostList::render()
stream << postListBegin; stream << postListBegin;
for(auto &pair : pageList) for(auto &pair : pageList)
{ {
std::string title = pageDao->find(pair.first)->title; std::string link = this->urlProvider->page(pair.first);
std::string link = this->urlProvider->pageByTitle(title);
std::string date = utils::toISODate(pair.second); std::string date = utils::toISODate(pair.second);
Varreplacer replacer{"{"}; Varreplacer replacer{"{"};
replacer.addKeyValue("url", link); replacer.addKeyValue("url", link);
replacer.addKeyValue("date", date); replacer.addKeyValue("date", date);
replacer.addKeyValue("title", title); replacer.addKeyValue("title", pageDao->find(pair.first)->title);
stream << replacer.parse(postLink); stream << replacer.parse(postLink);
} }