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

This commit is contained in:
Albert S. 2022-03-29 22:37:45 +02:00
rodzic 73a4e4c10f
commit 9b35e43161

Wyświetl plik

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