X-Git-Url: https://harishankar.org/repos/?p=biaweb2.git;a=blobdiff_plain;f=biawebdocument.hpp;h=0c0b74ca33027d64b8043480156ade99a14b8a9c;hp=f001373307fcb5400c12b61bb7ff0589df283ad5;hb=abd61eb094efbfca05e6fe0f1dd34a3e8e7de7a2;hpb=406aa544d873974501056201467c88366f9d31f9 diff --git a/biawebdocument.hpp b/biawebdocument.hpp index f001373..0c0b74c 100644 --- a/biawebdocument.hpp +++ b/biawebdocument.hpp @@ -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;