#ifndef PAGED_ARTICLES_H #define PAGED_ARTICLES_H #include "core/ustring.h" #include "core/vector.h" #include "../../http/web_node.h" // This class will load and process all md files from the folder set to it's folder property, // and generate one page from them. TThe files are processed in alphabetical order. // The generated HTML looks like: // render_menu() //
// Contents of the first md file. //
//
// Contents of the second md file. //
// ... // class WebServerRequest; class PagedArticles : public WebNode { GDCLASS(PagedArticles, WebNode); public: String get_folder(); void set_folder(const String &val); void _handle_request(Ref request); void _render_index(Ref request); void _render_preview(Ref request); void load(); void generate_index_page(); PagedArticles(); ~PagedArticles(); protected: void _notification(int what); static void _bind_methods(); String _folder; String _index_page; }; #endif