X-Git-Url: https://harishankar.org/repos/?p=biaweb2.git;a=blobdiff_plain;f=biawebtemplate.hpp;fp=biawebtemplate.hpp;h=8dd39dffc8d9a06c854f8820b2c34ef7048c031e;hp=604cb26bf707d0bb5b5a38ea14c4d38de809b1ea;hb=e16a6540bdbe09d54677caae65e16598c1da2538;hpb=c3f6c1be3a72da00b32eef61b9a4a381a76880eb diff --git a/biawebtemplate.hpp b/biawebtemplate.hpp index 604cb26..8dd39df 100644 --- a/biawebtemplate.hpp +++ b/biawebtemplate.hpp @@ -19,7 +19,9 @@ namespace biaweb { std::string navigationbit_tpl; std::string sidebar_tpl; std::string style_tpl; - std::array stringbits; + std::string rss_tpl; + std::string rss_item_tpl; + std::array stringbits; public: // constructor: generate the template bits from a template directory Template (std::string templatedir) ; @@ -34,6 +36,8 @@ namespace biaweb { std::string get_sidebar_tpl () { return this->sidebar_tpl; } std::string get_style_tpl () { return this->style_tpl; } std::string get_stringbit (unsigned int id) { return this->stringbits[id]; } + std::string get_rss_tpl () { return this->rss_tpl; } + std::string get_rss_item_tpl () { return this->rss_item_tpl; } }; // construct a template from a source directory @@ -48,7 +52,8 @@ namespace biaweb { this->navigationbit_tpl = load_from_file (templatedir + "/navigationbit.tpl.html"); this->sidebar_tpl = load_from_file (templatedir + "/sidebar.tpl.html"); this->style_tpl = load_from_file (templatedir + "/style.tpl.css"); - + this->rss_tpl = load_from_file (templatedir + "/rss.tpl.xml"); + this->rss_item_tpl = load_from_file (templatedir + "/rssitem.tpl.xml"); // read the stringbits into the array std::ifstream f (templatedir + "/stringbits.txt");