Added RSS feed to each category
[biaweb2.git] / biawebtemplate.hpp
index 604cb26..8dd39df 100644 (file)
@@ -19,7 +19,9 @@ namespace biaweb {
         std::string navigationbit_tpl;
         std::string sidebar_tpl;
         std::string style_tpl;
-        std::array<std::string, 6> stringbits;
+        std::string rss_tpl;
+        std::string rss_item_tpl;
+        std::array<std::string, 8> 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");