+
+ // Create the list of documents in this tree with links
+ // Reuse the sidebar class and sidebaritem class which is
+ // basically a list of links but instead of adding a sidebar
+ // add it to the content portion
+ SideBar article_list;
+ article_list.set_title (this->title + ": " + ART_LIST);
+ for (Document doc : this->docs) {
+ SideBarItem item;
+ item.set_sidebar_text (doc.get_title());
+ item.set_sidebar_url (urlpath + doc.get_filename() + ".html");
+ article_list.add_sidebar_item (item);
+ // output the document also, add the side bars
+ if (this->get_parent() != nullptr)
+ doc.add_side_bar (*bar1.get());
+ doc.add_side_bar (*bar2.get());
+ doc.output_to_html (filepath);
+ }
+ index.get()->set_content (article_list.to_html());
+
+ index.get()->output_to_html (filepath);