dynamic: DynamicContentPostList: Link using UrlProvider::pageByTitle()
This commit is contained in:
vanhempi
73a4e4c10f
commit
9b35e43161
@ -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);
|
||||
}
|
||||
|
Ladataan…
Viittaa uudesa ongelmassa
Block a user