Document tree generation to HTML output completed
[biaweb2.git] / biawebdocument.hpp
index f001373..0c0b74c 100644 (file)
@@ -41,7 +41,7 @@ namespace biaweb {
             this->meta_keywords = meta_keywords;
             this->content = content;
             this->is_index = is_index;
-            if (is_index)
+            if (is_index)
                 this->filename = convert_title (title);
             else 
                 this->filename = "index";
@@ -52,6 +52,8 @@ namespace biaweb {
         // set whether this is the index document
         void set_index (bool index = true) {
             this->is_index = index; 
+            index == true ? this->filename = "index" : 
+                            this->filename = convert_title (this->title);
         }
 
         // get whether this is the index document
@@ -59,6 +61,11 @@ namespace biaweb {
             return this->is_index;
         }
 
+        // get the file name
+        std::string get_filename () {
+            return this->filename;
+        }
+
         // set the document modification date
         void set_modified_date (std::time_t modif) {
             this->mdate = modif;