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

Tento commit je obsažen v:
Albert S. 2022-03-29 22:37:45 +02:00
rodič 73a4e4c10f
revize 9b35e43161

Zobrazit soubor

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