mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-02-20 15:14:26 +01:00
Rename summary in PagedArticle to index_page.
This commit is contained in:
parent
382696609c
commit
bb4aa4ebdd
@ -23,7 +23,7 @@ void PagedArticle::handle_request_main(Request *request) {
|
|||||||
render_menu(request);
|
render_menu(request);
|
||||||
|
|
||||||
// summary page
|
// summary page
|
||||||
request->body += summary_page;
|
request->body += index_page;
|
||||||
|
|
||||||
request->compile_and_send_body();
|
request->compile_and_send_body();
|
||||||
return;
|
return;
|
||||||
@ -101,7 +101,7 @@ void PagedArticle::load() {
|
|||||||
pages[files[i]] = finals;
|
pages[files[i]] = finals;
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
summary_page = (*finals);
|
index_page = (*finals);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,26 +116,10 @@ void PagedArticle::load() {
|
|||||||
|
|
||||||
file_cache->wwwroot_refresh_cache();
|
file_cache->wwwroot_refresh_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_summary();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagedArticle::generate_summary() {
|
String PagedArticle::get_index_page() {
|
||||||
if (summary_page != "") {
|
return index_page;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (std::map<String, String *>::iterator it = pages.begin(); it != pages.end(); ++it) {
|
|
||||||
String *s = (*it).second;
|
|
||||||
|
|
||||||
if (s != nullptr) {
|
|
||||||
summary_page = (*s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String PagedArticle::get_summary() {
|
|
||||||
return summary_page;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagedArticle::_notification(const int what) {
|
void PagedArticle::_notification(const int what) {
|
||||||
|
@ -18,8 +18,7 @@ public:
|
|||||||
|
|
||||||
void load();
|
void load();
|
||||||
void load_folder(const String &folder, const String &path);
|
void load_folder(const String &folder, const String &path);
|
||||||
void generate_summary();
|
String get_index_page();
|
||||||
String get_summary();
|
|
||||||
|
|
||||||
void _notification(const int what);
|
void _notification(const int what);
|
||||||
|
|
||||||
@ -31,7 +30,7 @@ public:
|
|||||||
String serve_folder;
|
String serve_folder;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
String summary_page;
|
String index_page;
|
||||||
std::map<String, String *> pages;
|
std::map<String, String *> pages;
|
||||||
FileCache *file_cache;
|
FileCache *file_cache;
|
||||||
};
|
};
|
||||||
|
@ -69,7 +69,7 @@ void PagedArticles::generate_summary() {
|
|||||||
|
|
||||||
if (a) {
|
if (a) {
|
||||||
b.a(a->get_full_uri());
|
b.a(a->get_full_uri());
|
||||||
b.div("article_list_entry")->w(a->get_summary())->cdiv();
|
b.div("article_list_entry")->w(a->get_index_page())->cdiv();
|
||||||
b.ca();
|
b.ca();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user