diff --git a/dynamic/dynamiccontentpostlist.cpp b/dynamic/dynamiccontentpostlist.cpp index 9c3d439..02b7ea8 100644 --- a/dynamic/dynamiccontentpostlist.cpp +++ b/dynamic/dynamiccontentpostlist.cpp @@ -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); }