dynamic: DynamicContentPostList: Link using UrlProvider::pageByTitle()
This commit is contained in:
父節點
73a4e4c10f
當前提交
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);
|
||||
}
|
||||
|
載入中…
新增問題並參考
Block a user