PagedArticles now uses the new summary page.

This commit is contained in:
Relintai 2022-02-05 13:27:33 +01:00
parent ead57f1d6a
commit eb4b1c073e
2 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@ void PagedArticles::_handle_request_main(Request *request) {
render_menu(request);
// summary page
request->body += summary_page;
request->body += index_page;
request->compile_and_send_body();
}
@ -56,10 +56,10 @@ void PagedArticles::load() {
dir->next();
}
generate_summary();
generate_index_page();
}
void PagedArticles::generate_summary() {
void PagedArticles::generate_index_page() {
HTMLBuilder b;
b.div("article_list");
@ -69,14 +69,14 @@ void PagedArticles::generate_summary() {
if (a) {
b.a(a->get_full_uri());
b.div("article_list_entry")->w(a->get_index_page())->cdiv();
b.div("article_list_entry")->w(a->get_summary())->cdiv();
b.ca();
}
}
b.cdiv();
summary_page = b.result;
index_page = b.result;
}
void PagedArticles::_notification(const int what) {

View File

@ -18,7 +18,7 @@ public:
void _handle_request_main(Request *request);
void load();
void generate_summary();
void generate_index_page();
void _notification(const int what);
@ -28,7 +28,7 @@ public:
String folder;
protected:
String summary_page;
String index_page;
};
#endif