diff --git a/dynamic/dynamiccontentpostlist.cpp b/dynamic/dynamiccontentpostlist.cpp index 02b7ea8..9c3d439 100644 --- a/dynamic/dynamiccontentpostlist.cpp +++ b/dynamic/dynamiccontentpostlist.cpp @@ -25,13 +25,12 @@ std::string DynamicContentPostList::render() stream << postListBegin; for(auto &pair : pageList) { - std::string title = pageDao->find(pair.first)->title; - std::string link = this->urlProvider->pageByTitle(title); + std::string link = this->urlProvider->page(pair.first); std::string date = utils::toISODate(pair.second); Varreplacer replacer{"{"}; replacer.addKeyValue("url", link); replacer.addKeyValue("date", date); - replacer.addKeyValue("title", title); + replacer.addKeyValue("title", pageDao->find(pair.first)->title); stream << replacer.parse(postLink); }